!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()}(window,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1390)}([function(t,e){function i(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&n.value&&"object"==typeof n.value&&(n=n.value),!(!n||! /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(n))&&(void 0===n.enumerable&&(n.enumerable=!0),void 0===n.configurable&&(n.configurable=!0),n)}function n(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,e,s,r){for(var a in e)if(e.hasOwnProperty(a)){var h=i(e,a,s);if(!1!==h){if(n((r||t).prototype,a)){if(o.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=e[a]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(106),r=new n({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new r(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return s(this.x,t.x,e)&&s(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)}});r.ZERO=new r,r.RIGHT=new r(1,0),r.LEFT=new r(-1,0),r.UP=new r(0,-1),r.DOWN=new r(0,1),r.ONE=new r(1,1),t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(47),r=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=s.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(23),r=i(22),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectFactory",o,"add"),t.exports=o},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=i,o=0;o * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e){ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},getComponentCount:function(t,e){for(var i=0,n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(48),r=i(152),o=i(274),a=i(47),h=i(56),l=i(155),u=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Alpha:i(532),AlphaSingle:i(269),Animation:i(503),BlendMode:i(272),ComputedSize:i(551),Crop:i(552),Depth:i(273),Flip:i(553),GetBounds:i(554),Mask:i(277),Origin:i(571),PathFollower:i(572),Pipeline:i(156),ScrollFactor:i(280),Size:i(573),Texture:i(574),TextureCrop:i(575),Tint:i(576),ToJSON:i(281),Transform:i(282),TransformMatrix:i(29),Visible:i(283)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(281),r=i(113),o=i(10),a=i(90),h=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new r(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new r(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},update:function(){},toJSON:function(){return s(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.scene.sys.displayList.getIndex(t)),i},destroy:function(t){if(void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this);var e=this.scene.sys;t||(e.displayList.remove(this),e.updateList.remove(this)),this.input&&(e.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),t||e.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});h.RENDER_MASK=15,t.exports=h},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(170),s=i(6);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(23),r=i(22),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectCreator",o,"make"),t.exports=o},function(t,e){t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(7),s=function(){var t,e,i,r,o,a,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={BLUR:i(555),BOOT:i(556),CONTEXT_LOST:i(557),CONTEXT_RESTORED:i(558),DESTROY:i(559),FOCUS:i(560),HIDDEN:i(561),PAUSE:i(562),POST_RENDER:i(563),POST_STEP:i(564),PRE_RENDER:i(565),PRE_STEP:i(566),READY:i(567),RESUME:i(568),STEP:i(569),VISIBLE:i(570)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(82),o=i(2),a=i(138),h=i(215),l=i(454),u=i(139),c=new n({initialize:function(t,e){this.loader=t,this.cache=o(e,"cache",!1),this.type=o(e,"type",!1),this.key=o(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.type||!this.key)throw new Error("Error calling 'Loader."+this.type+"' invalid key provided.");this.url=o(e,"url"),void 0===this.url?this.url=t.path+i+"."+o(e,"extension",""):"function"!=typeof this.url&&0!==this.url.indexOf("blob:")&&0!==this.url.indexOf("data:")&&(this.url=t.path+this.url),this.src="",this.xhrSettings=u(o(e,"responseType",void 0)),o(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,o(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?s.FILE_POPULATED:s.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=o(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===s.FILE_POPULATED?this.loader.nextFile(this,!0):(this.src=a(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&0===t.responseURL.indexOf("file://")&&0===e.target.status,n=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(n=!1),this.resetXHR(),this.loader.nextFile(this,n)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=s.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=s.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=s.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={BOOT:i(708),CREATE:i(709),DESTROY:i(710),PAUSE:i(711),POST_UPDATE:i(712),PRE_UPDATE:i(713),READY:i(714),RENDER:i(715),RESUME:i(716),SHUTDOWN:i(717),SLEEP:i(718),START:i(719),TRANSITION_COMPLETE:i(720),TRANSITION_INIT:i(721),TRANSITION_OUT:i(722),TRANSITION_START:i(723),TRANSITION_WAKE:i(724),UPDATE:i(725),WAKE:i(726)}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={},n={},s={register:function(t,e,n,s){void 0===s&&(s=!1),i[t]={plugin:e,mapping:n,custom:s}},registerCustom:function(t,e,i,s){n[t]={plugin:e,mapping:i,data:s}},hasCore:function(t){return i.hasOwnProperty(t)},hasCustom:function(t){return n.hasOwnProperty(t)},getCore:function(t){return i[t]},getCustom:function(t){return n[t]},getCustomClass:function(t){return n.hasOwnProperty(t)?n[t].plugin:null},remove:function(t){i.hasOwnProperty(t)&&delete i[t]},removeCustom:function(t){n.hasOwnProperty(t)&&delete n[t]},destroyCorePlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]},destroyCustomPlugins:function(){for(var t in n)n.hasOwnProperty(t)&&delete n[t]}};t.exports=s},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(2);t.exports=function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=o.width),void 0===s&&(s=o.height);var a=n(r,"isNotEmpty",!1),h=n(r,"isColliding",!1),l=n(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(s+=e,e=0),t+i>o.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c=0;o--)t[o][e]=i+a*n,a++;return t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n,s,r,o=i(33),a=i(167),h=[],l=!1;t.exports=(r=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return n(t,e,i,o.CANVAS)},create:n=function(t,e,i,n,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=o.CANVAS),void 0===r&&(r=!1);var c=s(n);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:n},n===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&n===o.CANVAS&&a.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return n(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:s=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(52),s=i(14);t.exports=function(t,e,i){e.x=s(i,"x",0),e.y=s(i,"y",0),e.depth=s(i,"depth",0),e.flipX=s(i,"flipX",!1),e.flipY=s(i,"flipY",!1);var r=s(i,"scale",null);"number"==typeof r?e.setScale(r):null!==r&&(e.scaleX=s(r,"x",1),e.scaleY=s(r,"y",1));var o=s(i,"scrollFactor",null);"number"==typeof o?e.setScrollFactor(o):null!==o&&(e.scrollFactorX=s(o,"x",1),e.scrollFactorY=s(o,"y",1)),e.rotation=s(i,"rotation",0);var a=s(i,"angle",null);null!==a&&(e.angle=a),e.alpha=s(i,"alpha",1);var h=s(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=s(h,"x",.5),u=s(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=s(i,"blendMode",n.NORMAL),e.visible=s(i,"visible",!0),s(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n.alpha*i.alpha;if(r<=0)return!1;var o=t._tempMatrix1.copyFromArray(n.matrix.matrix),a=t._tempMatrix2.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),h=t._tempMatrix3;return s?(o.multiplyWithOffset(s,-n.scrollX*i.scrollFactorX,-n.scrollY*i.scrollFactorY),a.e=i.x,a.f=i.y,o.multiply(a,h)):(a.e-=n.scrollX*i.scrollFactorX,a.f-=n.scrollY*i.scrollFactorY,o.multiply(a,h)),e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=r,e.save(),h.setToContext(e),e.imageSmoothingEnabled=!(!t.antialias||i.frame&&i.frame.source.scaleMode),!0}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(15),r=i(3),o=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===s&&(s=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,e,i,n,s,r,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||r?s.TAU-(r>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3];return n[0]=s*i+o*e,n[1]=r*i+a*e,n[2]=s*-e+o*i,n[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,s=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=n[0],c=n[1],d=n[2],f=n[3],p=n[4],g=n[5],v=void 0===e?this:e;return v.a=u*s+c*o,v.b=u*r+c*a,v.c=d*s+f*o,v.d=d*r+f*a,v.e=p*s+g*o+h,v.f=p*r+g*a+l,v},multiplyWithOffset:function(t,e,i){var n=this.matrix,s=t.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=e*r+i*a+n[4],u=e*o+i*h+n[5],c=s[0],d=s[1],f=s[2],p=s[3],g=s[4],v=s[5];return n[0]=c*r+d*a,n[1]=c*o+d*h,n[2]=f*r+p*a,n[3]=f*o+p*h,n[4]=g*r+v*a+l,n[5]=g*o+v*h+u,this},transform:function(t,e,i,n,s,r){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+n*l,o[3]=i*h+n*u,o[4]=s*a+r*l+c,o[5]=s*h+r*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5];return i.x=t*s+e*o+h,i.y=t*r+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=e*s-i*n;return t[0]=s/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-s*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,n,s,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(s||r){var h=Math.sqrt(s*s+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-s/h):-Math.acos(s/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,n,s){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*n,r[1]=o*n,r[2]=-o*s,r[3]=a*s,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var n=this.matrix,s=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=1/(s*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=s*c*e+-o*c*t+(-u*s+l*o)*c,i},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=o},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(12),r=i(13),o=i(56),a=new n({Extends:r,Mixins:[s.AlphaSingle,s.BlendMode,s.ComputedSize,s.Depth,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Transform,s.Visible],initialize:function(t,e,i){void 0===e&&(e="Shape"),r.call(this,t,e),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new o,this.initPipeline()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.isFilled=!1:(this.fillColor=t,this.fillAlpha=e,this.isFilled=!0),this},setStrokeStyle:function(t,e,i){return void 0===i&&(i=1),void 0===t?this.isStroked=!1:(this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this.isStroked=!0),this},setClosePath:function(t){return this.closePath=t,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]}});t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(165),r=i(295),o=i(166),a=i(296),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,n)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=n,this._locked=!1,this.update(s)},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return o(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,n=this.b,o=this.a;return this._color=s(e,i,n),this._color32=r(e,i,n,o),this._rgba="rgba("+e+","+i+","+n+","+o/255+")",t&&a(e,i,n,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t));return this.setTo(i,n,s)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,n=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),n=Math.max(0,Math.min(255,n-Math.round(-t/100*255))),this.setTo(e,i,n)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,o(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,o(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,o(this._h,this._s,t,this)}}});t.exports=h},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n={VERSION:"3.23.0",BlendModes:i(52),ScaleModes:i(234),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=n},function(t,e){t.exports=function(t,e,i,n,s,r){var o;void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=s;o=0;o--)t[o][e]+=i+a*n,a++;return t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(15);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={DESTROY:i(646),FADE_IN_COMPLETE:i(647),FADE_IN_START:i(648),FADE_OUT_COMPLETE:i(649),FADE_OUT_START:i(650),FLASH_COMPLETE:i(651),FLASH_START:i(652),PAN_COMPLETE:i(653),PAN_START:i(654),POST_RENDER:i(655),PRE_RENDER:i(656),ROTATE_COMPLETE:i(657),ROTATE_START:i(658),SHAKE_COMPLETE:i(659),SHAKE_START:i(660),ZOOM_COMPLETE:i(661),ZOOM_START:i(662)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},function(t,e){var i={};t.exports=i,function(){i._nextId=0,i._seed=0,i._nowStartTime=+new Date,i.extend=function(t,e){var n,s;"boolean"==typeof e?(n=2,s=e):(n=1,s=!0);for(var r=n;r0;e--){var n=Math.floor(i.random()*(e+1)),s=t[e];t[e]=t[n],t[n]=s}return t},i.choose=function(t){return t[Math.floor(i.random()*t.length)]},i.isElement=function(t){return"undefined"!=typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},i.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i.isFunction=function(t){return"function"==typeof t},i.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},i.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)},i.clamp=function(t,e,i){return ti?i:t},i.sign=function(t){return t<0?-1:1},i.now=function(){if("undefined"!=typeof window&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-i._nowStartTime},i.random=function(e,i){return i=void 0!==i?i:1,(e=void 0!==e?e:0)+t()*(i-e)};var t=function(){return i._seed=(9301*i._seed+49297)%233280,i._seed/233280};i.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},i.logLevel=1,i.log=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.info=function(){console&&i.logLevel>0&&i.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.warn=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.nextId=function(){return i._nextId++},i.indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var i=0;i=e&&t.y<=i&&t.y+t.height>=i}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(142),s=i(24);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=s(t,e,i,r,null,o),d=0;d * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return Math.sqrt(s*s+r*r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={BOOT:i(821),DESTROY:i(822),DRAG_END:i(823),DRAG_ENTER:i(824),DRAG:i(825),DRAG_LEAVE:i(826),DRAG_OVER:i(827),DRAG_START:i(828),DROP:i(829),GAME_OUT:i(830),GAME_OVER:i(831),GAMEOBJECT_DOWN:i(832),GAMEOBJECT_DRAG_END:i(833),GAMEOBJECT_DRAG_ENTER:i(834),GAMEOBJECT_DRAG:i(835),GAMEOBJECT_DRAG_LEAVE:i(836),GAMEOBJECT_DRAG_OVER:i(837),GAMEOBJECT_DRAG_START:i(838),GAMEOBJECT_DROP:i(839),GAMEOBJECT_MOVE:i(840),GAMEOBJECT_OUT:i(841),GAMEOBJECT_OVER:i(842),GAMEOBJECT_POINTER_DOWN:i(843),GAMEOBJECT_POINTER_MOVE:i(844),GAMEOBJECT_POINTER_OUT:i(845),GAMEOBJECT_POINTER_OVER:i(846),GAMEOBJECT_POINTER_UP:i(847),GAMEOBJECT_POINTER_WHEEL:i(848),GAMEOBJECT_UP:i(849),GAMEOBJECT_WHEEL:i(850),MANAGER_BOOT:i(851),MANAGER_PROCESS:i(852),MANAGER_UPDATE:i(853),POINTER_DOWN:i(854),POINTER_DOWN_OUTSIDE:i(855),POINTER_MOVE:i(856),POINTER_OUT:i(857),POINTER_OVER:i(858),POINTER_UP:i(859),POINTER_UP_OUTSIDE:i(860),POINTER_WHEEL:i(861),POINTERLOCK_CHANGE:i(862),PRE_UPDATE:i(863),SHUTDOWN:i(864),START:i(865),UPDATE:i(866)}},function(t,e){t.exports=function(t,e,i){return t.radius>0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(275),r=i(153),o=i(47),a=i(154),h=i(3),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={COMPLETE:i(889),DECODED:i(890),DECODED_ALL:i(891),DESTROY:i(892),DETUNE:i(893),GLOBAL_DETUNE:i(894),GLOBAL_MUTE:i(895),GLOBAL_RATE:i(896),GLOBAL_VOLUME:i(897),LOOP:i(898),LOOPED:i(899),MUTE:i(900),PAUSE_ALL:i(901),PAUSE:i(902),PLAY:i(903),RATE:i(904),RESUME_ALL:i(905),RESUME:i(906),SEEK:i(907),STOP_ALL:i(908),STOP:i(909),UNLOCKED:i(910),VOLUME:i(911)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(21),o=i(8),a=i(2),h=i(6),l=i(7),u=new n({Extends:r,initialize:function(t,e,i,n,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:o};r.call(this,t,d),l(i)&&(this.data=o?h(i,o):i,this.state=s.FILE_POPULATED)},onProcess:function(){if(this.state!==s.FILE_POPULATED){this.state=s.FILE_PROCESSING;var t=JSON.parse(this.xhrLoader.responseText),e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",(function(t,e,i,n){if(Array.isArray(t))for(var s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t,e,i,n){this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=n,this.complete=!1,this.pending=n.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var s=0;s0&&r.rotateAbout(o.position,i,t.position,o.position)}},n.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},n.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},n.translate=function(t,e){n.setPosition(t,r.add(t.position,e))},n.rotate=function(t,e,i){if(i){var s=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;n.setPosition(t,{x:i.x+(o*s-a*r),y:i.y+(o*r+a*s)}),n.setAngle(t,t.angle+e)}else n.setAngle(t,t.angle+e)},n.scale=function(t,e,i,r){var o=0,a=0;r=r||t.position;for(var u=0;u0&&(o+=c.area,a+=c.inertia),c.position.x=r.x+(c.position.x-r.x)*e,c.position.y=r.y+(c.position.y-r.y)*i,h.update(c.bounds,c.vertices,t.velocity)}t.parts.length>1&&(t.area=o,t.isStatic||(n.setMass(t,t.density*o),n.setInertia(t,a))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null)},n.update=function(t,e,i,n){var o=Math.pow(e*i*t.timeScale,2),a=1-t.frictionAir*i*t.timeScale,u=t.position.x-t.positionPrev.x,c=t.position.y-t.positionPrev.y;t.velocity.x=u*a*n+t.force.x/t.mass*o,t.velocity.y=c*a*n+t.force.y/t.mass*o,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.position.x+=t.velocity.x,t.position.y+=t.velocity.y,t.angularVelocity=(t.angle-t.anglePrev)*a*n+t.torque/t.inertia*o,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=r.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var d=0;d0&&(f.position.x+=t.velocity.x,f.position.y+=t.velocity.y),0!==t.angularVelocity&&(s.rotate(f.vertices,t.angularVelocity,t.position),l.rotate(f.axes,t.angularVelocity),d>0&&r.rotateAbout(f.position,t.angularVelocity,t.position,f.position)),h.update(f.bounds,f.vertices,t.velocity)}},n.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,s=e.y-t.position.y;t.torque+=n*i.y-s*i.x},n._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(55),r=i(266),o=i(267),a=i(47),h=i(150),l=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.type=a.CIRCLE,this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=l},function(t,e,i){"use strict"; /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */function n(t,e,i){i=i||2;var n,a,h,l,u,f,g,v=e&&e.length,m=v?e[0]*i:t.length,y=s(t,0,m,i,!0),x=[];if(!y||y.next===y.prev)return x;if(v&&(y=function(t,e,i,n){var o,a,h,l=[];for(o=0,a=e.length;o80*i){n=h=t[0],a=l=t[1];for(var T=i;Th&&(h=u),f>l&&(l=f);g=0!==(g=Math.max(h-n,l-a))?1/g:0}return o(y,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===_(t,e,i,n)>0)for(r=e;r=e;r-=n)o=b(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(E(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(E(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),E(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(m(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&m(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(m(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(l,u,e,i,n),p=t.prevZ,v=t.nextZ;p&&p.z>=c&&v&&v.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;v&&v.z<=d;){if(v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&x(s,n,n.next,r)&&T(s,r)&&T(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),E(n),E(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=w(h,l);return h=r(h,h.next),u=r(u,u.next),o(h,e,i,n,s,a),void o(u,e,i,n,s,a)}l=l.next}h=h.next}while(h!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&s!==n.x&&g(ri.x)&&T(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=w(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&T(t,e)&&T(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function m(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||m(t,e,i)>0!=m(t,e,n)>0&&m(i,n,t)>0!=m(i,n,e)>0}function T(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function w(t,e){var i=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function b(t,e,i,n){var s=new S(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function E(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function _(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i,n){var s=t.length;if(e<0||e>s||e>=i||i>s||e+i>s){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(115),s=i(181);t.exports=function(t,e){var i=n.Power0;if("string"==typeof t)if(n.hasOwnProperty(t))i=n[t];else{var r="";t.indexOf(".")&&("in"===(r=t.substr(t.indexOf(".")+1)).toLowerCase()?r="easeIn":"out"===r.toLowerCase()?r="easeOut":"inout"===r.toLowerCase()&&(r="easeInOut")),t=s(t.substr(0,t.indexOf(".")+1)+r),n.hasOwnProperty(t)&&(i=n[t])}else"function"==typeof t?i=t:Array.isArray(t)&&t.length;if(!e)return i;var o=e.slice(0);return o.unshift(0),function(t){return o[0]=t,i.apply(this,o)}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(9);t.exports=function(t,e,i,s,r){var o=t.strokeTint,a=n.getTintAppendFloatAlphaAndSwap(e.strokeColor,e.strokeAlpha*i);o.TL=a,o.TR=a,o.BL=a,o.BR=a;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-s,f=h[1]-r;e.closePath||(l-=2);for(var p=2;p * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(83),r=i(424),o=i(425),a=i(47),h=i(56),l=i(158),u=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.type=a.TRIANGLE,this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(21),o=i(8),a=i(2),h=i(7),l=new n({Extends:r,initialize:function t(e,i,n,s,o){var l,u="png";if(h(i)){var c=i;i=a(c,"key"),n=a(c,"url"),l=a(c,"normalMap"),s=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:s,config:o};if(r.call(this,e,d),l){var f=new t(e,this.key,l,s,o);f.type="normalMap",this.setLink(f),e.addFile(f)}},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});o.register("image",(function(t,e,i){if(Array.isArray(t))for(var n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(12),r=i(443),o=new n({Mixins:[s.Alpha,s.Flip,s.Visible],initialize:function(t,e,i,n,s,r,o,a){this.layer=t,this.index=e,this.x=i,this.y=n,this.width=s,this.height=r,this.baseWidth=void 0!==o?o:s,this.baseHeight=void 0!==a?a:r,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=null,this.collisionCallbackContext=this,this.tint=16777215,this.physics={}},containsPoint:function(t,e){return!(tthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){return void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){return void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(12),r=i(13),o=i(965),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,o){r.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s.Animation(this),this.setTexture(n,o),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=a},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],s=e;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(176),r=i(11),o=i(3),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++)i.push(this.getPoint(n/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++){var s=this.getUtoTmapping(n/t,null,t);i.push(this.getPoint(s))}return i},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={ADD:i(868),COMPLETE:i(869),FILE_COMPLETE:i(870),FILE_KEY_COMPLETE:i(871),FILE_LOAD_ERROR:i(872),FILE_LOAD:i(873),FILE_PROGRESS:i(874),POST_PROCESS:i(875),PROGRESS:i(876),START:i(877)}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+s*s,u=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=l*d-u*u,g=0===p?0:1/p,v=(d*c-u*f)*g,m=(l*f-u*c)*g;return v>=0&&m>=0&&v+m<1}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=e.x1,l=e.y1,u=e.x2,c=e.y2,d=(c-l)*(o-s)-(u-h)*(a-r);if(0===d)return!1;var f=((u-h)*(r-l)-(c-l)*(s-h))/d,p=((o-s)*(r-l)-(a-r)*(s-h))/d;return f>=0&&f<=1&&p>=0&&p<=1&&(i.x=s+f*(o-s),i.y=r+f*(a-r),!0)}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n={};t.exports=n;var s=i(99),r=i(38);n.create=function(t,e){for(var i=[],n=0;n0)return!1}return!0},n.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||n.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},n.hull=function(t){var e,i,n=[],r=[];for((t=t.slice(0)).sort((function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y})),i=0;i=2&&s.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&s.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(19);t.exports=function(t,e,i){return(i-e)*n(t,0,1)}},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={DESTROY:i(581),VIDEO_COMPLETE:i(582),VIDEO_CREATED:i(583),VIDEO_ERROR:i(584),VIDEO_LOOP:i(585),VIDEO_PLAY:i(586),VIDEO_SEEKED:i(587),VIDEO_SEEKING:i(588),VIDEO_STOP:i(589),VIDEO_TIMEOUT:i(590),VIDEO_UNLOCKED:i(591)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(12),r=i(35),o=i(10),a=i(36),h=i(11),l=i(29),u=i(164),c=i(3),d=new n({Extends:o,Mixins:[s.Alpha,s.Visible],initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.resolution=1,this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._cx=0,this._cy=0,this._cw=0,this._ch=0,this._width=i,this._height=n,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoom=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var n=.5*this.width,s=.5*this.height;return i.x=t-n,i.y=e-s,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(!o)return t;var a=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,f=this.culledObjects,p=t.length;o=1/o,f.length=0;for(var g=0;gC&&w_&&bs&&(t=s),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,n=e.y+(i-this.height)/2,s=Math.max(n,n+e.height-i);return ts&&(t=s),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,s){return void 0===s&&(s=!1),this._bounds.setTo(t,e,i,n),this.dirty=!0,this.useBounds=!0,s?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t;var e=t.sys;this.sceneManager=e.game.scene,this.scaleManager=e.scale,this.cameraManager=e.cameras;var i=this.scaleManager.resolution;return this.resolution=i,this._cx=this._x*i,this._cy=this._y*i,this._cw=this._width*i,this._ch=this._height*i,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),0===t&&(t=.001),this.zoom=t,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},updateSystem:function(){if(this.scaleManager){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this._cx=t*this.resolution,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this._cy=t*this.resolution,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this._cw=t*this.resolution,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this._ch=t*this.resolution,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){this._scrollX=t,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(t){this._scrollY=t,this.dirty=!0}},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoom}},displayHeight:{get:function(){return this.height/this.zoom}}});t.exports=d},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={ENTER_FULLSCREEN:i(702),FULLSCREEN_FAILED:i(703),FULLSCREEN_UNSUPPORTED:i(704),LEAVE_FULLSCREEN:i(705),ORIENTATION_CHANGE:i(706),RESIZE:i(707)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(19),r=i(18),o=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,o,n,s)},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.cutX=i,this.cutY=n,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var s=this.data,r=s.cut;r.x=i,r.y=n,r.w=t,r.h=e,r.r=i+t,r.b=n+e,s.sourceSize.w=t,s.sourceSize.h=e,s.spriteSourceSize.w=t,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(t*t+e*e);var o=s.drawImage;return o.x=i,o.y=n,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,a.r=i+s,a.b=n+r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,n,r,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=s(e,0,d)),g=l+(i=s(i,0,f)),v=n=s(n,0,d-e),m=r=s(r,0,f-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,T=e+(n=s(n,0,u-e)),w=i+(r=s(r,0,c-i));if(x.rT||x.y>w)p=0,g=0,v=0,m=0;else{var b=Math.max(x.x,e),E=Math.max(x.y,i),S=Math.min(x.r,T)-b,_=Math.min(x.b,w)-E;v=S,m=_,p=o?h+(u-(b-x.x)-S):h+(b-x.x),g=a?l+(c-(E-x.y)-_):l+(E-x.y),e=b,i=E,n=S,r=_}}else o&&(p=h+(u-e-n)),a&&(g=l+(c-i-r));var A=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/A),t.v0=Math.max(0,g/C),t.u1=Math.min(1,(p+v)/A),t.v1=Math.min(1,(g+m)/C),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=v,t.ch=m,t.width=n,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(96),r=i(397),o=i(398),a=i(47),h=i(157),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(241),s=i(0),r=i(90),o=i(2),a=i(6),h=i(7),l=i(391),u=i(133),c=i(75),d=new s({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?h(e[0])&&(i=e,e=null):h(e)&&(i=e,e=null),this.scene=t,this.children=new u(e),this.isParent=!0,this.type="Group",this.classType=o(i,"classType",c),this.name=o(i,"name",""),this.active=o(i,"active",!0),this.maxSize=o(i,"maxSize",-1),this.defaultKey=o(i,"defaultKey",null),this.defaultFrame=o(i,"defaultFrame",null),this.runChildUpdate=o(i,"runChildUpdate",!1),this.createCallback=o(i,"createCallback",null),this.removeCallback=o(i,"removeCallback",null),this.createMultipleCallback=o(i,"createMultipleCallback",null),this.internalCreateCallback=o(i,"internalCreateCallback",null),this.internalRemoveCallback=o(i,"internalRemoveCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof s&&(l.x=s),"number"==typeof r&&(l.y=r),l):n?this.create(s,r,o,a,h):null},get:function(t,e,i,n,s){return this.getFirst(!1,!0,t,e,i,n,s)},getFirstAlive:function(t,e,i,n,s,r){return this.getFirst(!0,t,e,i,n,s,r)},getFirstDead:function(t,e,i,n,s,r){return this.getFirst(!1,t,e,i,n,s,r)},playAnimation:function(t,e){return n.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(9);t.exports=function(t,e,i,s,r,o){for(var a=n.getTintAppendFloatAlphaAndSwap(i.fillColor,i.fillAlpha*s),h=i.pathData,l=i.pathIndexes,u=0;ut.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},i.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e){t.exports=function(t,e,i){return t>=0&&t=0&&e * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(2),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","layer"),this.x=s(t,"x",0),this.y=s(t,"y",0),this.width=s(t,"width",0),this.height=s(t,"height",0),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.baseTileWidth=s(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=s(t,"baseTileHeight",this.tileHeight),this.widthInPixels=s(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=s(t,"alpha",1),this.visible=s(t,"visible",!0),this.properties=s(t,"properties",[]),this.indexes=s(t,"indexes",[]),this.collideIndexes=s(t,"collideIndexes",[]),this.callbacks=s(t,"callbacks",[]),this.bodies=s(t,"bodies",[]),this.data=s(t,"data",[]),this.tilemapLayer=s(t,"tilemapLayer",null)}});t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(2),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","map"),this.width=s(t,"width",0),this.height=s(t,"height",0),this.infinite=s(t,"infinite",!1),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.widthInPixels=s(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.tileHeight),this.format=s(t,"format",null),this.orientation=s(t,"orientation","orthogonal"),this.renderOrder=s(t,"renderOrder","right-down"),this.version=s(t,"version","1"),this.properties=s(t,"properties",{}),this.layers=s(t,"layers",[]),this.images=s(t,"images",[]),this.objects=s(t,"objects",{}),this.collision=s(t,"collision",{}),this.tilesets=s(t,"tilesets",[]),this.imageCollections=s(t,"imageCollections",[]),this.tiles=s(t,"tiles",[])}});t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(12),r=i(13),o=i(968),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,s){r.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()}});t.exports=a},function(t,e){t.exports=function(t,e){return t.hasOwnProperty(e)}},function(t,e,i){var n={};t.exports=n;var s=i(86),r=i(38),o=i(62),a=i(100),h=i(99),l=i(1383);n.rectangle=function(t,e,i,n,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:s.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(a.chamfer){var l=a.chamfer;h.vertices=s.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},n.trapezoid=function(t,e,i,n,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-n+" L "+c+" "+-n+" L "+d+" 0":"L 0 0 L "+c+" "+-n+" L "+d+" 0";var f={label:"Trapezoid Body",position:{x:t,y:e},vertices:s.fromPath(l)};if(h.chamfer){var p=h.chamfer;f.vertices=s.chamfer(f.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete h.chamfer}return o.create(r.extend({},f,h))},n.circle=function(t,e,i,s,o){s=s||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),n.polygon(t,e,h,i,r.extend({},a,s))},n.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return n.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d0&&s.area(T)1?(d=o.create(r.extend({parts:f.slice(0)},a)),o.setPosition(d,{x:t,y:e}),d):f[0]},n.flagCoincidentParts=function(t,e){void 0===e&&(e=5);for(var i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(52),s=i(65),r=i(55),o=i(0),a=i(12),h=i(13),l=i(11),u=i(48),c=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,s,r){void 0===s&&(s=1),void 0===r&&(r=s),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=s,this.height=r,this.blendMode=n.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e,i){void 0===i&&(i=!0),this.width=t,this.height=e,this.updateDisplayOrigin();var n=this.input;return i&&n&&!n.customHitArea&&(n.hitArea.width=t,n.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new s(0,0,t),r)},setRectangleDropZone:function(t,e){return this.setDropZone(new l(0,0,t,e),u)},setDropZone:function(t,e){return void 0===t?this.setRectangleDropZone(this.width,this.height):this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(){},renderWebGL:function(){}});t.exports=c},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={ADD_ANIMATION:i(533),ANIMATION_COMPLETE:i(534),ANIMATION_REPEAT:i(535),ANIMATION_RESTART:i(536),ANIMATION_START:i(537),PAUSE_ALL:i(538),REMOVE_ANIMATION:i(539),RESUME_ALL:i(540),SPRITE_ANIMATION_COMPLETE:i(541),SPRITE_ANIMATION_KEY_COMPLETE:i(542),SPRITE_ANIMATION_KEY_REPEAT:i(543),SPRITE_ANIMATION_KEY_RESTART:i(544),SPRITE_ANIMATION_KEY_START:i(545),SPRITE_ANIMATION_KEY_UPDATE:i(546),SPRITE_ANIMATION_REPEAT:i(547),SPRITE_ANIMATION_RESTART:i(548),SPRITE_ANIMATION_START:i(549),SPRITE_ANIMATION_UPDATE:i(550)}},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(284),r=new n({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(302),s=i(303),r=i(304),o=i(305),a=i(306),h=i(307),l=i(308),u=i(309),c=i(310),d=i(311),f=i(312),p=i(313);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e,i){(function(e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?i.macOS=!0:/Android/.test(t)?i.android=!0:/Linux/.test(t)?i.linux=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);return(i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&e.versions&&e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(this,i(728))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n,s=i(117),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e){t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={ADD:i(780),ERROR:i(781),LOAD:i(782),READY:i(783),REMOVE:i(784)}},function(t,e){t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement)return t;return i||(i=document.body),i.appendChild(t),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(80);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var o=e.length-1;o>=0;){var a=e[o];-1!==(r=t.indexOf(a))?(n(t,r),i&&i.call(s,a)):e.pop(),o--}return e}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(67);t.exports=function(t,e){var i=n(t);for(var s in e)i.hasOwnProperty(s)||(i[s]=e[s]);return i}},function(t,e,i){ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(67),r=i(10),o=i(59),a=i(20),h=i(1),l=i(381),u=i(382),c=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(a.BLUR,this.onGameBlur,this),t.events.on(a.FOCUS,this.onGameFocus,this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var n in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var r=s(e),o=i.spritemap[n];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:n,start:o.start,duration:o.end-o.start,config:r})}return i},get:function(t){return u(this.sounds,"key",t)},getAll:function(t){return l(this.sounds,"key",t)},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once(o.COMPLETE,n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeAll:function(){this.sounds.forEach((function(t){t.destroy()})),this.sounds.length=0},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound((function(t){t.pause()})),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound((function(t){t.resume()})),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound((function(t){t.stop()})),this.emit(o.STOP_ALL,this)},stopByKey:function(t){var e=0;return this.getAll(t).forEach((function(t){t.stop()&&e++})),e},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.pauseOnBlur&&this.onFocus()},update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach((function(i){i.update(t,e)}))},destroy:function(){this.game.events.off(a.BLUR,this.onGameBlur,this),this.game.events.off(a.FOCUS,this.onGameFocus,this),this.game.events.off(a.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach((function(n,s){n&&!n.pendingRemove&&t.call(e||i,n,s,i.sounds)}))},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(o.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(o.GLOBAL_DETUNE,this,t)}}});t.exports=c},function(t,e,i){ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(10),r=i(59),o=i(18),a=i(1),h=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name||(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,0)))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name||(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),1)))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying||(this.isPlaying=!1,this.isPaused=!0,0))},resume:function(){return!(!this.isPaused||this.isPlaying||(this.isPlaying=!0,this.isPaused=!1,0))},stop:function(){return!(!this.isPaused&&!this.isPlaying||(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),0))},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:a,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.emit(r.DESTROY,this),this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(183),s=i(0),r=i(1),o=i(131),a=new s({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?n.Add(this.list,t):n.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?n.AddAt(this.list,t,e):n.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o.inplace(this.list,e),this):this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,s){return n.GetFirst(this.list,t,e,i,s)},getAll:function(t,e,i,s){return n.GetAll(this.list,t,e,i,s)},count:function(t,e){return n.CountAllMatching(this.list,t,e)},swap:function(t,e){n.Swap(this.list,t,e)},moveTo:function(t,e){return n.MoveTo(this.list,t,e)},remove:function(t,e){return e?n.Remove(this.list,t):n.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?n.RemoveAt(this.list,t):n.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?n.RemoveBetween(this.list,t,e):n.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return n.BringToTop(this.list,t)},sendToBack:function(t){return n.SendToBack(this.list,t)},moveUp:function(t){return n.MoveUp(this.list,t),t},moveDown:function(t){return n.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e){return n.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){for(var i=[null],n=2;n0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(184),s=i(389);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=s(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=s(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ //! stable.js 0.1.6, https://github.com/Two-Screen/stable //! © 2017 Angry Bytes and contributors. MIT licensed. !function(){var e=function(t,e){return i(t.slice(),e)};function i(t,e){"function"!=typeof e&&(e=function(t,e){return String(t).localeCompare(e)});var i=t.length;if(i<=1)return t;for(var s=new Array(i),r=1;rl&&(r=l),o>l&&(o=l),a=s,h=r;;)if(a * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(12),r=i(13),o=i(943),a=i(944),h=i(187),l=i(945),u=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Texture,s.Tint,s.Transform,s.Visible,l],initialize:function(t,e,i,n,s,a,h){void 0===s&&(s=""),void 0===h&&(h=0),r.call(this,t,"BitmapText"),this.font=n;var l=this.scene.sys.cache.bitmapFont.get(n);this.fontData=l.data,this._text="",this._fontSize=a||this.fontData.size,this._letterSpacing=0,this._align=h,this._bounds=o(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.setTexture(l.texture,l.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.setText(s)},setLeftAlign:function(){return this._align=u.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=u.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=u.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(t){return this._fontSize=t,this._dirty=!0,this},setLetterSpacing:function(t){return void 0===t&&(t=0),this._letterSpacing=t,this._dirty=!0,this},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this.text&&(this._text=t.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},getTextBounds:function(t){var e=this._bounds;return(this._dirty||this.scaleX!==e.scaleX||this.scaleY!==e.scaleY)&&(o(this,t,e),this._dirty=!1,this.updateDisplayOrigin()),e},setFont:function(t,e,i){if(void 0===e&&(e=this._fontSize),void 0===i&&(i=this._align),t!==this.font){var n=this.scene.sys.cache.bitmapFont.get(t);n&&(this.font=t,this.fontData=n.data,this._fontSize=e,this._align=i,this.setTexture(n.texture,n.frame),o(this,!1,this._bounds))}return this},setMaxWidth:function(t,e){return this._maxWidth=t,this._dirty=!0,void 0!==e&&(this.wordWrapCharCode=e),this},align:{set:function(t){this._align=t,this._dirty=!0},get:function(){return this._align}},text:{set:function(t){this.setText(t)},get:function(){return this._text}},fontSize:{set:function(t){this._fontSize=t,this._dirty=!0},get:function(){return this._fontSize}},letterSpacing:{set:function(t){this._letterSpacing=t,this._dirty=!0},get:function(){return this._letterSpacing}},maxWidth:{set:function(t){this._maxWidth=t,this._dirty=!0},get:function(){return this._maxWidth}},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing,align:this.align};return t.data=e,t}});u.ALIGN_LEFT=0,u.ALIGN_CENTER=1,u.ALIGN_RIGHT=2,u.ParseFromAtlas=a,u.ParseXMLBitmapFont=h,t.exports=u},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=0;e-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.entries.forEach((function(t){e.set(t)})),this.entries.forEach((function(t){e.set(t)})),e},intersect:function(t){var e=new n;return this.entries.forEach((function(i){t.contains(i)&&e.set(i)})),e},difference:function(t){var e=new n;return this.entries.forEach((function(i){t.contains(i)||e.set(i)})),e},size:{get:function(){return this.entries.length},set:function(t){return t * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(12),r=i(13),o=i(1075),a=i(1),h=new n({Extends:r,Mixins:[s.BlendMode,s.Depth,s.Mask,s.Pipeline,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,l){if(r.call(this,t,"Mesh"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var u,c=n.length/2|0;if(o.length>0&&o.length0&&a.lengthe.right||t.y>e.bottom)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(6),s={},r={register:function(t,e,i,n,r){s[t]={plugin:e,mapping:i,settingsKey:n,configKey:r}},getPlugin:function(t){return s[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in s){var a=s[o].plugin,h=s[o].mapping,l=s[o].settingsKey,u=s[o].configKey;n(i,l,r[u])&&(t[h]=new a(t))}},remove:function(t){s.hasOwnProperty(t)&&delete s[t]}};t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={ANY_KEY_DOWN:i(1215),ANY_KEY_UP:i(1216),COMBO_MATCH:i(1217),DOWN:i(1218),KEY_DOWN:i(1219),KEY_UP:i(1220),UP:i(1221)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(217),r=i(75),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={CalculateFacesAt:i(220),CalculateFacesWithin:i(51),Copy:i(1311),CreateFromTiles:i(1312),CullTiles:i(1313),Fill:i(1314),FilterTiles:i(1315),FindByIndex:i(1316),FindTile:i(1317),ForEachTile:i(1318),GetTileAt:i(142),GetTileAtWorldXY:i(1319),GetTilesWithin:i(24),GetTilesWithinShape:i(1320),GetTilesWithinWorldXY:i(1321),HasTileAt:i(475),HasTileAtWorldXY:i(1322),IsInLayerBounds:i(101),PutTileAt:i(221),PutTileAtWorldXY:i(1323),PutTilesAt:i(1324),Randomize:i(1325),RemoveTileAt:i(476),RemoveTileAtWorldXY:i(1326),RenderDebug:i(1327),ReplaceByIndex:i(474),SetCollision:i(1328),SetCollisionBetween:i(1329),SetCollisionByExclusion:i(1330),SetCollisionByProperty:i(1331),SetCollisionFromCollisionGroup:i(1332),SetTileIndexCallback:i(1333),SetTileLocationCallback:i(1334),Shuffle:i(1335),SwapByIndex:i(1336),TileToWorldX:i(143),TileToWorldXY:i(1337),TileToWorldY:i(144),WeightedRandomize:i(1338),WorldToTileX:i(63),WorldToTileXY:i(1339),WorldToTileY:i(64)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(101);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t]||null;return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e){t.exports=function(t,e,i){return t.hasOwnProperty(e)?"function"==typeof t[e]?function(i,n,s,r,o,a){return t[e](i,n,s,r,o,a)}:function(){return t[e]}:"function"==typeof i?i:function(){return i}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(230),s=i(14),r=i(88),o=i(69),a=i(145),h=i(497),l=i(228),u=i(6),c=i(229),d=i(231),f=i(233);t.exports=function(t,e,i){void 0===i&&(i=n);for(var p=i.targets?i.targets:l(e),g=h(e),v=a(e,"delay",i.delay),m=a(e,"duration",i.duration),y=u(e,"easeParams",i.easeParams),x=o(u(e,"ease",i.ease),y),T=a(e,"hold",i.hold),w=a(e,"repeat",i.repeat),b=a(e,"repeatDelay",i.repeatDelay),E=r(e,"yoyo",i.yoyo),S=r(e,"flipX",i.flipX),_=r(e,"flipY",i.flipY),A=[],C=0;C * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(9),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=1,this.width=0,this.height=0,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes,this.gl),this.flushLocked=!1,this.active=!1},boot:function(){},addAttribute:function(t,e,i,n,r){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:n,offset:r}),this.vertexComponentCount=s.getComponentCount(this.attributes,this.gl),this},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):-1!==h&&t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this},setFloat1:function(t,e){return this.renderer.setFloat1(this.program,t,e),this},setFloat2:function(t,e,i){return this.renderer.setFloat2(this.program,t,e,i),this},setFloat3:function(t,e,i,n){return this.renderer.setFloat3(this.program,t,e,i,n),this},setFloat4:function(t,e,i,n,s){return this.renderer.setFloat4(this.program,t,e,i,n,s),this},setFloat1v:function(t,e){return this.renderer.setFloat1v(this.program,t,e),this},setFloat2v:function(t,e){return this.renderer.setFloat2v(this.program,t,e),this},setFloat3v:function(t,e){return this.renderer.setFloat3v(this.program,t,e),this},setFloat4v:function(t,e){return this.renderer.setFloat4v(this.program,t,e),this},setInt1:function(t,e){return this.renderer.setInt1(this.program,t,e),this},setInt2:function(t,e,i){return this.renderer.setInt2(this.program,t,e,i),this},setInt3:function(t,e,i,n){return this.renderer.setInt3(this.program,t,e,i,n),this},setInt4:function(t,e,i,n,s){return this.renderer.setInt4(this.program,t,e,i,n,s),this},setMatrix2:function(t,e,i){return this.renderer.setMatrix2(this.program,t,e,i),this},setMatrix3:function(t,e,i){return this.renderer.setMatrix3(this.program,t,e,i),this},setMatrix4:function(t,e,i){return this.renderer.setMatrix4(this.program,t,e,i),this}});t.exports=r},function(t,e,i){var n={};t.exports=n;var s=i(240),r=i(38),o=i(100),a=i(62);n.create=function(t){return r.extend({id:r.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{}},t)},n.setModified=function(t,e,i,r){if(s.trigger(t,"compositeModified",t),t.isModified=e,i&&t.parent&&n.setModified(t.parent,e,i,r),r)for(var o=0;o * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e){void 0===e&&(e=new n);var i=2*Math.PI*Math.random(),s=Math.random()+Math.random(),r=s>1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(19),s=i(0),r=i(10),o=i(111),a=i(270),h=i(271),l=i(6),u=new s({Extends:r,initialize:function(t,e,i){r.call(this),this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,l(i,"frames",[]),l(i,"defaultTextureKey",null)),this.frameRate=l(i,"frameRate",null),this.duration=l(i,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=l(i,"skipMissedFrames",!0),this.delay=l(i,"delay",0),this.repeat=l(i,"repeat",0),this.repeatDelay=l(i,"repeatDelay",0),this.yoyo=l(i,"yoyo",!1),this.showOnStart=l(i,"showOnStart",!1),this.hideOnComplete=l(i,"hideOnComplete",!1),this.paused=!1,this.manager.on(o.PAUSE_ALL,this.pause,this),this.manager.on(o.RESUME_ALL,this.resume,this)},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t0){s.isLast=!0,s.nextFrame=a[0],a[0].prevFrame=s;var v=1/(a.length-1);for(r=0;r=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):t.repeatCounter>0?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t._reverse===!e&&t.repeatCounter>0)return t._repeatDelay&&!t.pendingRepeat||(t.forward=e),void this.repeatAnimation(t);if(t._reverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else this.completeAnimation(t)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?t._reverse&&!t.forward?(t.currentFrame=this.getLastFrame(),this.repeatAnimation(t)):(t.forward=!0,this.repeatAnimation(t)):this.completeAnimation(t):this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.updateFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop)return this.completeAnimation(t);if(t._repeatDelay>0&&!1===t.pendingRepeat)t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay;else if(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying){this.getNextTick(t),t.pendingRepeat=!1;var e=t.currentFrame,i=t.parent;this.emit(o.ANIMATION_REPEAT,this,e),i.emit(o.SPRITE_ANIMATION_KEY_REPEAT+this.key,this,e,t.repeatCounter,i),i.emit(o.SPRITE_ANIMATION_REPEAT,this,e,t.repeatCounter,i)}},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach((function(e){t.frames.push(e.toJSON())})),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),n=0;n1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[n-1],t.nextFrame=this.frames[n+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.removeAllListeners(),this.manager.off(o.PAUSE_ALL,this.pause,this),this.manager.off(o.RESUME_ALL,this.resume,this),this.manager.remove(this.key);for(var t=0;t * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(112),s=i(4);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(57),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e){t.exports={defaultPipeline:null,pipeline:null,initPipeline:function(t){void 0===t&&(t="TextureTintPipeline");var e=this.scene.sys.game.renderer;return!!(e&&e.gl&&e.hasPipeline(t))&&(this.defaultPipeline=e.getPipeline(t),this.pipeline=this.defaultPipeline,!0)},setPipeline:function(t){var e=this.scene.sys.game.renderer;return e&&e.gl&&e.hasPipeline(t)&&(this.pipeline=e.getPipeline(t)),this},resetPipeline:function(){return this.pipeline=this.defaultPipeline,null!==this.pipeline},getPipelineName:function(){return this.pipeline.name}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random()*Math.PI*2,s=Math.sqrt(Math.random());return e.x=t.x+s*Math.cos(i)*t.width/2,e.y=t.y+s*Math.sin(i)*t.height/2,e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x2-t.x1,s=t.y2-t.y1,r=t.x3-t.x1,o=t.y3-t.y1,a=Math.random(),h=Math.random();return a+h>=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(294),s=i(297),r=i(299),o=i(300);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(165);t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1);var r=Math.floor(6*t),o=6*t-r,a=Math.floor(i*(1-e)*255),h=Math.floor(i*(1-o*e)*255),l=Math.floor(i*(1-(1-o)*e)*255),u=i=Math.floor(i*=255),c=i,d=i,f=r%6;return 0===f?(c=l,d=a):1===f?(u=h,d=a):2===f?(u=a,d=l):3===f?(u=a,c=h):4===f?(u=l,c=a):5===f&&(c=a,d=h),s?s.setTo?s.setTo(u,c,d,s.alpha,!1):(s.r=u,s.g=c,s.b=d,s.color=n(u,c,d),s):{r:u,g:c,b:d,color:n(u,c,d)}}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(117),s=i(118),r=i(26),o={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){o.canvas=!!window.CanvasRenderingContext2D;try{o.localStorage=!!localStorage.getItem}catch(t){o.localStorage=!1}o.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),o.fileSystem=!!window.requestFileSystem;var t,e,i,a=!1;return o.webGL=function(){if(window.WebGLRenderingContext)try{var t=r.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=r.create2D(this),n=i.getContext("2d").createImageData(1,1);return a=n.data instanceof Uint8ClampedArray,r.remove(t),r.remove(i),!!e}catch(t){return!1}return!1}(),o.worker=!!window.Worker,o.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,o.getUserMedia=o.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,s.firefox&&s.firefoxVersion<21&&(o.getUserMedia=!1),!n.iOS&&(s.ie||s.firefox||s.chrome)&&(o.canvasBitBltShift=!0),(s.safari||s.mobileSafari)&&(o.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(o.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(o.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),o.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==o.littleEndian&&a,o}()},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(15),s=i(18),r={Angle:i(733),Distance:i(743),Easing:i(748),Fuzzy:i(749),Interpolation:i(752),Pow2:i(757),Snap:i(759),RandomDataGenerator:i(761),Average:i(762),Bernstein:i(323),Between:i(172),CatmullRom:i(171),CeilTo:i(763),Clamp:i(19),DegToRad:i(35),Difference:i(764),Factorial:i(324),FloatBetween:i(119),FloorTo:i(765),FromPercent:i(87),GetSpeed:i(766),IsEven:i(767),IsEvenStrict:i(768),Linear:i(116),MaxAdd:i(769),MinSub:i(770),Percent:i(771),RadToDeg:i(173),RandomXY:i(772),RandomXYZ:i(773),RandomXYZW:i(774),Rotate:i(330),RotateAround:i(276),RotateAroundDistance:i(159),RoundAwayFromZero:i(331),RoundTo:i(775),SinCosTableGenerator:i(776),SmootherStep:i(160),SmoothStep:i(161),ToXY:i(777),TransformXY:i(332),Within:i(778),Wrap:i(58),Vector2:i(3),Vector3:i(174),Vector4:i(333),Matrix3:i(334),Matrix4:i(335),Quaternion:i(336),RotateVec3:i(779)};r=s(!1,r,n),t.exports=r},function(t,e){t.exports=function(t,e,i,n,s){var r=.5*(n-e),o=.5*(s-i),a=t*t;return(2*i-2*n+r+o)*(t*a)+(-3*i+3*n-2*r-o)*a+r*t+i}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(15);t.exports=function(t){return t*n.RAD_TO_DEG}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],m=s[12],y=s[13],x=s[14],T=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+m)*T,this.y=(e*o+i*u+n*p+y)*T,this.z=(e*a+i*c+n*g+x)*T,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e,i){t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(11),s=i(15);t.exports=function(t,e){if(void 0===e&&(e=new n),0===t.length)return e;for(var i,r,o,a=Number.MAX_VALUE,h=Number.MAX_VALUE,l=s.MIN_SAFE_INTEGER,u=s.MIN_SAFE_INTEGER,c=0;c * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n={CENTER:i(358),ORIENTATION:i(359),SCALE_MODE:i(360),ZOOM:i(361)};t.exports=n},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e){t.exports={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(125),r=i(175),o=i(22),a=i(878),h=i(879),l=i(1),u=i(374),c=new n({initialize:function(t,e){this.scene=t,this.game,this.renderer,this.config=e,this.settings=u.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=l},init:function(t){this.settings.status=s.INIT,this.sceneUpdate=l,this.game=t,this.renderer=t.renderer,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.addToScene(this,r.Global,[r.CoreScene,h(this),a(this)]),this.events.emit(o.BOOT,this),this.settings.isBooted=!0},install:function(t){Array.isArray(t)||(t=[t]),this.plugins.installLocal(this,t)},step:function(t,e){this.events.emit(o.PRE_UPDATE,t,e),this.events.emit(o.UPDATE,t,e),this.sceneUpdate.call(this.scene,t,e),this.events.emit(o.POST_UPDATE,t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.cameras.render(t,e),this.events.emit(o.RENDER,t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(t){return this.settings.active&&(this.settings.status=s.PAUSED,this.settings.active=!1,this.events.emit(o.PAUSE,this,t)),this},resume:function(t){return this.settings.active||(this.settings.status=s.RUNNING,this.settings.active=!0,this.events.emit(o.RESUME,this,t)),this},sleep:function(t){return this.settings.status=s.SLEEPING,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.SLEEP,this,t),this},wake:function(t){var e=this.settings;return e.status=s.RUNNING,e.active=!0,e.visible=!0,this.events.emit(o.WAKE,this,t),e.isTransition&&this.events.emit(o.TRANSITION_WAKE,e.transitionFrom,e.transitionDuration),this},getData:function(){return this.settings.data},isSleeping:function(){return this.settings.status===s.SLEEPING},isActive:function(){return this.settings.status===s.RUNNING},isPaused:function(){return this.settings.status===s.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){t&&(this.settings.data=t),this.settings.status=s.START,this.settings.active=!0,this.settings.visible=!0,this.events.emit(o.START,this),this.events.emit(o.READY,this,t)},shutdown:function(t){this.events.off(o.TRANSITION_INIT),this.events.off(o.TRANSITION_START),this.events.off(o.TRANSITION_COMPLETE),this.events.off(o.TRANSITION_OUT),this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.SHUTDOWN,this,t)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.DESTROY,this),this.events.removeAllListeners();for(var t=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],e=0;e * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(94),r=i(377),o=new n({initialize:function(t,e,i,n,s){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var o=0;o * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Matrix:i(914),Add:i(921),AddAt:i(922),BringToTop:i(923),CountAllMatching:i(924),Each:i(925),EachInRange:i(926),FindClosestInSorted:i(270),GetAll:i(381),GetFirst:i(382),GetRandom:i(185),MoveDown:i(927),MoveTo:i(928),MoveUp:i(929),NumberArray:i(930),NumberArrayStep:i(931),QuickSelect:i(390),Range:i(391),Remove:i(123),RemoveAt:i(932),RemoveBetween:i(933),RemoveRandomElement:i(934),Replace:i(935),RotateLeft:i(286),RotateRight:i(287),SafeRange:i(68),SendToBack:i(936),SetAll:i(937),Shuffle:i(114),SpliceOne:i(80),StableSort:i(131),Swap:i(938)}},function(t,e){t.exports=function(t){if(!Array.isArray(t)||t.length<2||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(10),r=i(940),o=new n({Extends:s,initialize:function(){s.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,t},remove:function(t){return this._destroy.push(t),this._toProcess++,t},removeAll:function(){for(var t=this._active,e=this._destroy,i=t.length;i--;)e.push(t[i]),this._toProcess++;return this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ function i(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,e,n,s){void 0===e&&(e=0),void 0===n&&(n=0);var r={},o=t.getElementsByTagName("info")[0],a=t.getElementsByTagName("common")[0];r.font=o.getAttribute("face"),r.size=i(o,"size"),r.lineHeight=i(a,"lineHeight")+n,r.chars={};var h=t.getElementsByTagName("char"),l=void 0!==s&&s.trimmed;if(l)var u=s.height,c=s.width;for(var d=0;d * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(948),s=i(951),r=i(0),o=i(12),a=i(94),h=i(13),l=i(129),u=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){h.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline(),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},function(t,e,i){ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(183),s=i(52),r=i(0),o=i(12),a=i(90),h=i(13),l=i(11),u=i(952),c=i(393),d=i(3),f=new r({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Transform,o.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._displayList=t.sys.displayList,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,n=new l,s=i[0].getBounds();t.setTo(s.x,s.y,s.width,s.height);for(var r=1;r-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){var i,n=[null],s=this.list.slice(),r=s.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null}});t.exports=f},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(132),s=i(0),r=i(957),o=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,o,a){n.call(this,t,e,i,s,r,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(91),s=i(0),r=i(192),o=i(269),a=i(272),h=i(273),l=i(277),u=i(156),c=i(282),d=i(283),f=i(280),p=i(29),g=i(95),v=i(13),m=i(2),y=i(6),x=i(15),T=i(963),w=new s({Extends:v,Mixins:[o,a,h,l,u,c,d,f,T],initialize:function(t,e){var i=y(e,"x",0),n=y(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this._tempMatrix1=new p,this._tempMatrix2=new p,this._tempMatrix3=new p,this.setDefaultStyles(e)},setDefaultStyles:function(t){return y(t,"lineStyle",null)&&(this.defaultStrokeWidth=y(t,"lineStyle.width",1),this.defaultStrokeColor=y(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=y(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),y(t,"fillStyle",null)&&(this.defaultFillColor=y(t,"fillStyle.color",16777215),this.defaultFillAlpha=y(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,n,s){return void 0===s&&(s=1),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,s,t,e,i,n),this},lineGradientStyle:function(t,e,i,n,s,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,n,s),this},setTexture:function(t,e,i){if(void 0===i&&(i=0),void 0===t)this.commandBuffer.push(r.CLEAR_TEXTURE);else{var n=this.scene.sys.textures.getFrame(t,e);n&&(2===i&&(i=3),this.commandBuffer.push(r.SET_TEXTURE,n,i))}return this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this},fillRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=m(s,"tl",20),o=m(s,"tr",20),a=m(s,"bl",20),h=m(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=m(s,"tl",20),o=m(s,"tr",20),a=m(s,"bl",20),h=m(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},strokePoints:function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var s=1;s-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys,o=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),w.TargetCamera.setScene(this.scene),w.TargetCamera.setViewport(0,0,e,i),w.TargetCamera.scrollX=this.x,w.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var a=(n=r.textures.get(t)).getSourceImage();a instanceof HTMLCanvasElement&&(s=a.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(o,this,0,w.TargetCamera,null,s,!1),n&&n.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});w.TargetCamera=new n,t.exports=w},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,SET_TEXTURE:19,CLEAR_TEXTURE:20,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(12),r=i(13),o=i(401),a=i(129),h=i(403),l=i(973),u=new n({Extends:r,Mixins:[s.Depth,s.Mask,s.Pipeline,s.Transform,s.Visible,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},removeEmitter:function(t){return this.emitters.remove(t,!0)},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(52),s=i(91),r=i(26),o=i(0),a=i(12),h=i(33),l=i(94),u=i(13),c=i(977),d=i(9),f=i(196),p=new o({Extends:u,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Crop,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.ScrollFactor,a.Tint,a.Transform,a.Visible,c],initialize:function(t,e,i,n,o,a,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=32),void 0===o&&(o=32),u.call(this,t,"RenderTexture"),this.renderer=t.sys.game.renderer,this.textureManager=t.sys.textures,this.globalTint=16777215,this.globalAlpha=1,this.canvas=null,this.framebuffer=null,this.dirty=!1,this._crop=this.resetCropObject(),this.texture=null,this.frame=null,this._saved=!1,void 0===a?(this.canvas=r.create2D(this,n,o),this.texture=t.sys.textures.addCanvas(f(),this.canvas),this.frame=this.texture.get()):(this.texture=t.sys.textures.get(a),this.frame=this.texture.get(l),this.canvas=this.frame.source.image,this._saved=!0,this.dirty=!0,this.width=this.frame.cutWidth,this.height=this.frame.cutHeight),this.context=this.canvas.getContext("2d"),this._eraseMode=!1,this.camera=new s(0,0,n,o),this.gl=null,this.glTexture=null;var c=this.renderer;if(c.type===h.WEBGL){var d=c.gl;this.gl=d,this.glTexture=this.frame.source.glTexture,this.drawGameObject=this.batchGameObjectWebGL,this.framebuffer=c.createFramebuffer(n,o,this.glTexture,!1)}else c.type===h.CANVAS&&(this.drawGameObject=this.batchGameObjectCanvas);this.camera.setScene(t),this.setPosition(e,i),void 0===a&&this.setSize(n,o),this.setOrigin(0,0),this.initPipeline()},setSize:function(t,e){return this.resize(t,e)},resize:function(t,e){if(void 0===e&&(e=t),t!==this.width||e!==this.height){if("__BASE"===this.frame.name){if(this.canvas.width=t,this.canvas.height=e,this.texture.width=t,this.texture.height=e,this.gl){var i=this.gl;this.renderer.deleteTexture(this.frame.source.glTexture),this.renderer.deleteFramebuffer(this.framebuffer);var n=this.renderer.createTexture2D(0,i.NEAREST,i.NEAREST,i.CLAMP_TO_EDGE,i.CLAMP_TO_EDGE,i.RGBA,null,t,e,!1);this.framebuffer=this.renderer.createFramebuffer(t,e,n,!1),this.frame.source.isRenderTexture=!0,this.frame.glTexture=n,this.glTexture=n}this.frame.source.width=t,this.frame.source.height=e,this.camera.setSize(t,e),this.frame.setSize(t,e),this.width=t,this.height=e}}else{var s=this.texture.getSourceImage();this.frame.cutX+t>s.width&&(t=s.width-this.frame.cutX),this.frame.cutY+e>s.height&&(e=s.height-this.frame.cutY),this.frame.setSize(t,e,this.frame.cutX,this.frame.cutY)}this.updateDisplayOrigin();var r=this.input;return r&&!r.customHitArea&&(r.hitArea.width=t,r.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.frame.cutWidth),void 0===r&&(r=this.frame.cutHeight);var o=255&(t>>16|0),a=255&(t>>8|0),h=255&(0|t),l=this.gl,u=this.frame;if(this.camera.preRender(1,1),l){var c=this.camera._cx,f=this.camera._cy,p=this.camera._cw,g=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(c,f,p,g,g);var v=this.pipeline;v.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),v.drawFillRect(i,n,s,r,d.getTintFromFloats(o/255,a/255,h/255,1),e),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),v.projOrtho(0,v.width,v.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.context.fillStyle="rgba("+o+","+a+","+h+","+e+")",this.context.fillRect(i+u.cutX,n+u.cutY,s,r),this.renderer.setContext();return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.gl;if(t){var e=this.renderer;e.setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)}else{var i=this.context;i.save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()}this.dirty=!1}return this},erase:function(t,e,i){this._eraseMode=!0;var s=this.renderer.currentBlendMode;return this.renderer.setBlendMode(n.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(s),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r=this.gl;if(this.camera.preRender(1,1),r){var o=this.camera._cx,a=this.camera._cy,h=this.camera._cw,l=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(o,a,h,l,l);var u=this.pipeline;u.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),u.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),u.projOrtho(0,u.width,u.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.batchList(t,e,i,n,s),this.renderer.setContext();return this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o=this.gl,a=this.textureManager.getFrame(t,e);if(a){if(this.camera.preRender(1,1),o){var h=this.camera._cx,l=this.camera._cy,u=this.camera._cw,c=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(h,l,u,c,c);var d=this.pipeline;d.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),d.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,r,s,this.camera.matrix,null),d.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),d.projOrtho(0,d.width,d.height,0,-1e3,1e3)}else this.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,s,r);this.dirty=!0}return this},batchList:function(t,e,i,n,s){for(var r=0;r * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(12),r=i(13),o=i(983),a=i(3),h=new n({Extends:r,Mixins:[s.AlphaSingle,s.BlendMode,s.Depth,s.Flip,s.Mask,s.Pipeline,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,o,h,l,u,c){void 0===n&&(n="__DEFAULT"),void 0===h&&(h=2),void 0===l&&(l=!0),r.call(this,t,"Rope"),this.anims=new s.Animation(this),this.points=h,this.vertices,this.uv,this.colors,this.alphas,this.tintFill="__DEFAULT"===n?2:0,this.dirty=!1,this.horizontal=l,this._flipX=!1,this._flipY=!1,this._perp=new a,this.debugCallback=null,this.debugGraphic=null,this.setTexture(n,o),this.setPosition(e,i),this.setSizeToFrame(),this.initPipeline("TextureTintStripPipeline"),Array.isArray(h)&&this.resizeArrays(h.length),this.setPoints(h,u,c),this.updateVertices()},preUpdate:function(t,e){var i=this.anims.currentFrame;this.anims.update(t,e),this.anims.currentFrame!==i&&(this.updateUVs(),this.updateVertices())},play:function(t,e,i){return this.anims.play(t,e,i),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(t,e,i))},setVertical:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(t,e,i)):this},setTintFill:function(t){return void 0===t&&(t=0),this.tintFill=t,this},setAlphas:function(t,e){var i=this.points.length;if(i<1)return this;var n,s=this.alphas;void 0===t?t=[1]:Array.isArray(t)||void 0!==e||(t=[t]);var r=0;if(void 0!==e)for(n=0;nr&&(o=t[r]),s[r]=o,t.length>r+1&&(o=t[r+1]),s[r+1]=o}return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i,n=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var s=0;if(t.length===e)for(i=0;is&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r}return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(122),s=i(26),r=i(0),o=i(12),a=i(20),h=i(13),l=i(986),u=i(6),c=i(178),d=i(987),f=i(990),p=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScrollFactor,o.Tint,o.Transform,o.Visible,d],initialize:function(t,e,i,n,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Text"),this.renderer=t.sys.game.renderer,this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.canvas=s.create(this),this.context=this.canvas.getContext("2d"),this.style=new f(this,r),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.dirty=!1,0===this.style.resolution&&(this.style.resolution=t.sys.game.config.resolution),this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(n),r&&r.padding&&this.setPadding(r.padding),r&&r.lineSpacing&&this.setLineSpacing(r.lineSpacing),t.sys.game.events.on(a.CONTEXT_RESTORED,(function(){this.dirty=!0}),this)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",n(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(t){var e=this.style;if(e.wordWrapCallback){var i=e.wordWrapCallback.call(e.wordWrapCallbackScope,t,this);return Array.isArray(i)&&(i=i.join("\n")),i}return e.wordWrapWidth?e.wordWrapUseAdvanced?this.advancedWordWrap(t,this.context,this.style.wordWrapWidth):this.basicWordWrap(t,this.context,this.style.wordWrapWidth):t},advancedWordWrap:function(t,e,i){for(var n="",s=t.replace(/ +/gi," ").split(this.splitRegExp),r=s.length,o=0;ol){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);u[c]=v,h+=g}var m=u[c].length?c:c+1,y=u.slice(m).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=y+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=s.length-1,o=e.measureText(" ").width,a=0;a<=r;a++){for(var h=i,l=s[a].split(" "),u=l.length-1,c=0;c<=u;c++){var d=l[c],f=e.measureText(d).width,p=f+o;p>h&&c>0&&(n+="\n",h=i),n+=d,c0&&(d+=h.lineSpacing*g),i.rtl)c=f-c;else if("right"===i.align)c+=o-h.lineWidths[g];else if("center"===i.align)c+=(o-h.lineWidths[g])/2;else if("justify"===i.align&&h.lineWidths[g]/h.width>=.85){var v=h.width-h.lineWidths[g],m=e.measureText(" ").width,y=a[g].trim(),x=y.split(" ");v+=(a[g].length-y.length)*m;for(var T=Math.floor(v/m),w=0;T>0;)x[w]+=" ",w=(w+1)%(x.length-1||1),--T;a[g]=x.join(" ")}this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(a[g],c,d)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(a[g],c,d))}e.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var b=this.input;return b&&!b.customHitArea&&(b.hitArea.width=this.width,b.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&c(this.canvas),s.remove(this.canvas),this.texture.destroy()}});t.exports=p},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(26),s=i(0),r=i(12),o=i(20),a=i(13),h=i(328),l=i(167),u=i(992),c=i(3),d=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,u],initialize:function(t,e,i,s,r,l,u){var d=t.sys.game.renderer;a.call(this,t,"TileSprite");var f=t.sys.textures.get(l),p=f.get(u);s&&r?(s=Math.floor(s),r=Math.floor(r)):(s=p.width,r=p.height),this._tilePosition=new c,this._tileScale=new c(1,1),this.dirty=!1,this.renderer=d,this.canvas=n.create(this,s,r),this.context=this.canvas.getContext("2d"),this.displayTexture=f,this.displayFrame=p,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=h(p.width),this.potHeight=h(p.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(s,r),this.setFrame(u),this.setOriginFromFrame(),this.initPipeline(),t.sys.game.events.on(o.CONTEXT_RESTORED,(function(t){var e=t.gl;this.dirty=!0,this.fillPattern=null,this.fillPattern=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.fillCanvas,this.potWidth,this.potHeight)}),this)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=h(e.width),this.potHeight=h(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,n=this.potWidth,s=this.potHeight;this.renderer.gl||(n=t.cutWidth,s=t.cutHeight),e.clearRect(0,0,n,s),i.width=n,i.height=s,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,n,s),this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||l.disable(e);var i=this._tileScale.x,n=this._tileScale.y,s=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,n),e.translate(-s,-r),e.fillStyle=this.fillPattern,e.fillRect(s,r,this.width/i,this.height/n),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),n.remove(this.canvas),n.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=d},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(19),r=i(12),o=i(90),a=i(20),h=i(13),l=i(59),u=i(196),c=i(995),d=i(15),f=new n({Extends:h,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,c],initialize:function(t,e,i,n){h.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=u(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=d.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.initPipeline(),n&&this.changeSource(n,!1);var s=t.sys.game.events;s.on(a.PAUSE,this.globalPause,this),s.on(a.RESUME,this.globalResume,this);var r=t.sys.sound;r&&r.on(l.GLOBAL_MUTE,this.globalMute,this)},play:function(t,e,i){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var n=this.video;if(!n)return console.warn("Video not loaded"),this;void 0===t&&(t=n.loop);var s=this.scene.sys.sound;s&&s.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&i>e&&(this._markerOut=i),n.loop=t;var r=this._callbacks,o=n.play();return void 0!==o?o.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(n.addEventListener("playing",r.play,!0),n.readyState<2&&(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),n.addEventListener("ended",r.end,!0),n.addEventListener("timeupdate",r.time,!0),n.addEventListener("seeking",r.seeking,!0),n.addEventListener("seeked",r.seeked,!0),this},changeSource:function(t,e,i,n,s){void 0===e&&(e=!0),this.video&&this.stop();var r=this.scene.sys.cache.video.get(t);return r?(this.video=r,this._cacheKey=t,this._codePaused=r.paused,this._codeMuted=r.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,r,r.videoWidth,r.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,r.videoWidth,r.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,r.videoWidth,r.videoHeight)):this.updateTexture(),r.currentTime=0,this._lastUpdate=0,e&&this.play(i,n,s)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),void 0===s&&(s=i),void 0===r&&(r=n);var o=this.video,a=this.snapshotTexture;return a?(a.setSize(s,r),o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)):(a=this.scene.sys.textures.createCanvas(u(),s,r),this.snapshotTexture=a,o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)),a.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},loadURL:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");return n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),n.addEventListener("error",this._callbacks.error,!0),n.src=t,n.load(),this.video=n,this},playPromiseSuccessHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){this.scene.sys.input.once("pointerdown",this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,t)},playHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadErrorHandler:function(t){this.stop(),this.emit(o.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.video.play(),this.emit(o.VIDEO_PLAY,this)},completeHandler:function(){this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(t.loop?(t.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=e,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var t=this.video,e=t.videoWidth,i=t.videoHeight;if(this.videoTexture){var n=this.videoTextureSource;n.source!==t&&(n.source=t,n.width=e,n.height=i),n.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,t,e,i),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,e,i),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,e,i)},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var n=i*t;this.setCurrentTime(n)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],n=parseFloat(t.substr(1));"+"===i?t=e.currentTime+n:"-"===i&&(t=e.currentTime-n)}e.currentTime=t,this._lastUpdate=t}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,i=t.duration;if(i!==1/0&&!isNaN(i))return e/i}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.video.play()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&(t?e.paused||e.pause():t||e.paused&&!this._systemPaused&&e.play()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=s(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i],!0);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(l.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=f},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(202),r=i(418),o=i(47),a=new n({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(134),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,t=this.frame,this.uv[0]=t.u0,this.uv[1]=t.v0,this.uv[2]=t.u0,this.uv[3]=t.v1,this.uv[4]=t.u1,this.uv[5]=t.v1,this.uv[6]=t.u0,this.uv[7]=t.v0,this.uv[8]=t.u1,this.uv[9]=t.v1,this.uv[10]=t.u1,this.uv[11]=t.v0,this},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(12),r=i(13),o=i(2),a=i(18),h=i(426),l=i(1078),u=i(29),c=new n({Extends:r,Mixins:[s.ComputedSize,s.Depth,s.GetBounds,s.Mask,s.Origin,s.ScrollFactor,s.Transform,s.Visible,l],initialize:function(t,e,i,n,s,o,a,h){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=128),void 0===o&&(o=128),r.call(this,t,"Shader"),this.blendMode=-1,this.shader;var l=t.sys.renderer;this.renderer=l,this.gl=l.gl,this.vertexData=new ArrayBuffer(2*Float32Array.BYTES_PER_ELEMENT*6),this.vertexBuffer=l.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=l.width,this._rendererHeight=l.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(i,n),this.setSize(s,o),this.setOrigin(.5,.5),this.setShader(e,a,h)},willRender:function(t){return!!this.renderToTexture||!(r.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setRenderToTexture:function(t,e){if(void 0===e&&(e=!1),!this.renderToTexture){var i=this.width,n=this.height,s=this.renderer;this.glTexture=s.createTextureFromSource(null,i,n,0),this.glTexture.flipY=e,this.framebuffer=s.createFramebuffer(i,n,this.glTexture,!1),this._rendererWidth=i,this._rendererHeight=n,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),t&&(this.texture=this.scene.sys.textures.addGLTexture(t,this.glTexture,i,n))}if(this.shader){var r=s.currentPipeline;s.clearPipeline(),this.load(),this.flush(),s.rebindPipeline(r)}return this},setShader:function(t,e,i){if(void 0===e&&(e=[]),"string"==typeof t){var n=this.scene.sys.cache.shader;if(!n.has(t))return console.warn("Shader missing: "+t),this;this.shader=n.get(t)}else this.shader=t;var s=this.gl,r=this.renderer;this.program&&s.deleteProgram(this.program);var o=r.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);r.setMatrix4(o,"uViewMatrix",!1,this.viewMatrix),r.setMatrix4(o,"uProjectionMatrix",!1,this.projectionMatrix),r.setFloat2(o,"uResolution",this.width,this.height),this.program=o;var h=new Date,l={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[h.getFullYear(),h.getMonth(),h.getDate(),60*h.getHours()*60+60*h.getMinutes()+h.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=a(!0,{},this.shader.uniforms,l):this.uniforms=l;for(var u=0;u<4;u++)e[u]&&this.setSampler2D("iChannel"+u,e[u],u,i);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(t){return this.pointer=t,this},projOrtho:function(t,e,i,n){var s=1/(t-e),r=1/(i-n),o=this.projectionMatrix;o[0]=-2*s,o[5]=-2*r,o[10]=-.001,o[12]=(t+e)*s,o[13]=(n+i)*r,o[14]=-0;var a=this.program;this.renderer.setMatrix4(a,"uProjectionMatrix",!1,this.projectionMatrix),this._rendererWidth=e,this._rendererHeight=i},initUniforms:function(){var t=this.gl,e=this.renderer.glFuncMap,i=this.program;for(var n in this._textureCount=0,this.uniforms){var s=this.uniforms[n],r=s.type,o=e[r];s.uniformLocation=t.getUniformLocation(i,n),"sampler2D"!==r&&(s.glMatrix=o.matrix,s.glValueLength=o.length,s.glFunc=o.func)}},setSampler2DBuffer:function(t,e,i,n,s,r){void 0===s&&(s=0),void 0===r&&(r={});var o=this.uniforms[t];return o.value=e,r.width=i,r.height=n,o.textureData=r,this._textureCount=s,this.initSampler2D(o),this},setSampler2D:function(t,e,i,n){void 0===i&&(i=0);var s=this.scene.sys.textures;if(s.exists(e)){var r=s.getFrame(e),o=this.uniforms[t],a=r.source;o.textureKey=e,o.source=a.image,o.value=r.glTexture,a.isGLTexture&&(n||(n={}),n.width=a.width,n.height=a.height),n&&(o.textureData=n),this._textureCount=i,this.initSampler2D(o)}return this},setUniform:function(t,e){return h(this.uniforms,t,e),this},getUniform:function(t){return o(this.uniforms,t,null)},setChannel0:function(t,e){return this.setSampler2D("iChannel0",t,0,e)},setChannel1:function(t,e){return this.setSampler2D("iChannel1",t,1,e)},setChannel2:function(t,e){return this.setSampler2D("iChannel2",t,2,e)},setChannel3:function(t,e){return this.setSampler2D("iChannel3",t,3,e)},initSampler2D:function(t){if(t.value){var e=this.gl;e.activeTexture(e.TEXTURE0+this._textureCount),e.bindTexture(e.TEXTURE_2D,t.value);var i=t.textureData;if(i){var n=e[o(i,"magFilter","linear").toUpperCase()],s=e[o(i,"minFilter","linear").toUpperCase()],r=e[o(i,"wrapS","repeat").toUpperCase()],a=e[o(i,"wrapT","repeat").toUpperCase()],h=e[o(i,"format","rgba").toUpperCase()];if(i.repeat&&(r=e.REPEAT,a=e.REPEAT),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!!i.flipY),i.width){var l=o(i,"width",512),u=o(i,"height",2),c=o(i,"border",0);e.texImage2D(e.TEXTURE_2D,0,h,l,u,c,h,e.UNSIGNED_BYTE,null)}else e.texImage2D(e.TEXTURE_2D,0,h,e.RGBA,e.UNSIGNED_BYTE,t.source);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,a)}this.renderer.setProgram(this.program),e.uniform1i(t.uniformLocation,this._textureCount),this._textureCount++}},syncUniforms:function(){var t,e,i,n,s,r=this.gl,o=this.uniforms,a=0;for(var h in o)i=(t=o[h]).glFunc,e=t.glValueLength,n=t.uniformLocation,null!==(s=t.value)&&(1===e?t.glMatrix?i.call(r,n,t.transpose,s):i.call(r,n,s):2===e?i.call(r,n,s.x,s.y):3===e?i.call(r,n,s.x,s.y,s.z):4===e?i.call(r,n,s.x,s.y,s.z,s.w):"sampler2D"===t.type&&(r.activeTexture(r["TEXTURE"+a]),r.bindTexture(r.TEXTURE_2D,s),r.uniform1i(n,a),a++))},load:function(t){var e=this.gl,i=this.width,n=this.height,s=this.renderer,r=this.program,o=this.viewMatrix;if(!this.renderToTexture){var a=-this._displayOriginX,h=-this._displayOriginY;o[0]=t[0],o[1]=t[1],o[4]=t[2],o[5]=t[3],o[8]=t[4],o[9]=t[5],o[12]=o[0]*a+o[4]*h,o[13]=o[1]*a+o[5]*h}e.useProgram(r),e.uniformMatrix4fv(e.getUniformLocation(r,"uViewMatrix"),!1,o),e.uniform2f(e.getUniformLocation(r,"uResolution"),this.width,this.height);var l=this.uniforms,u=l.resolution;u.value.x=i,u.value.y=n,l.time.value=s.game.loop.getDuration();var c=this.pointer;if(c){var d=l.mouse,f=c.x/i,p=1-c.y/n;d.value.x=f.toFixed(2),d.value.y=p.toFixed(2)}this.syncUniforms()},flush:function(){var t=this.width,e=this.height,i=this.program,n=this.gl,s=this.vertexBuffer,r=this.renderer,o=2*Float32Array.BYTES_PER_ELEMENT;this.renderToTexture&&(r.setFramebuffer(this.framebuffer),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT)),n.bindBuffer(n.ARRAY_BUFFER,s);var a=n.getAttribLocation(i,"inPosition");-1!==a&&(n.enableVertexAttribArray(a),n.vertexAttribPointer(a,2,n.FLOAT,!1,o,0));var h=this.vertexViewF32;h[3]=e,h[4]=t,h[5]=e,h[8]=t,h[9]=e,h[10]=t,n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,6*o)),n.drawArrays(n.TRIANGLES,0,6),this.renderToTexture&&r.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},preDestroy:function(){var t=this.gl;t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(this.renderer.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null)}});t.exports=c},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(53);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e,i){ /** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4),s=i(208);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a=t.x1,h=t.y1,l=t.x2,u=t.y2,c=e.x,d=e.y,f=e.radius,p=l-a,g=u-h,v=a-c,m=h-d,y=p*p+g*g,x=2*(p*v+g*m),T=x*x-4*y*(v*v+m*m-f*f);if(0===T){var w=-x/(2*y);r=a+w*p,o=h+w*g,w>=0&&w<=1&&i.push(new n(r,o))}else if(T>0){var b=(-x-Math.sqrt(T))/(2*y);r=a+b*p,o=h+b*g,b>=0&&b<=1&&i.push(new n(r,o));var E=(-x+Math.sqrt(T))/(2*y);r=a+E*p,o=h+E*g,E>=0&&E<=1&&i.push(new n(r,o))}}return i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(55),s=new(i(4));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e,i){ /** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4),s=i(84),r=i(431);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new n,new n,new n,new n],c=[s(o,t,u[0]),s(a,t,u[1]),s(h,t,u[2]),s(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,g=u*d+c*f,v=d*d+f*f,m=p*v-g*g,y=0===m?0:1/m,x=t.x1,T=t.y1,w=0;w=0&&r>=0&&s+r<1&&(n.push({x:e[w].x,y:e[w].y}),i)));w++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,o=t.x3-e,a=t.y3-i,t.x3=o*s-a*r+e,t.y3=o*r+a*s+i,t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={BUTTON_DOWN:i(1201),BUTTON_UP:i(1202),CONNECTED:i(1203),DISCONNECTED:i(1204),GAMEPAD_BUTTON_DOWN:i(1205),GAMEPAD_BUTTON_UP:i(1206)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(18),s=i(139);t.exports=function(t,e){var i=void 0===t?s():n({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(21),o=i(8),a=i(2),h=i(7),l=i(363),u=new n({Extends:r,initialize:function(t,e,i,n){var s="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"xml",cache:t.cacheManager.xml,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():(console.warn("Invalid XMLFile: "+this.key),this.onProcessError())}});o.register("xml",(function(t,e,i){if(Array.isArray(t))for(var n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Acceleration:i(1261),Angular:i(1262),Bounce:i(1263),Debug:i(1264),Drag:i(1265),Enable:i(1266),Friction:i(1267),Gravity:i(1268),Immovable:i(1269),Mass:i(1270),Size:i(1271),Velocity:i(1272)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={COLLIDE:i(1274),OVERLAP:i(1275),PAUSE:i(1276),RESUME:i(1277),TILE_COLLIDE:i(1278),TILE_OVERLAP:i(1279),WORLD_BOUNDS:i(1280),WORLD_STEP:i(1281)}},function(t,e,i){var n={};t.exports=n;var s=i(86),r=i(99),o=i(239),a=i(100),h=i(512),l=i(38);n._warming=.4,n._torqueDampen=1,n._minLength=1e-6,n.create=function(t){var e=t;e.bodyA&&!e.pointA&&(e.pointA={x:0,y:0}),e.bodyB&&!e.pointB&&(e.pointB={x:0,y:0});var i=e.bodyA?r.add(e.bodyA.position,e.pointA):e.pointA,n=e.bodyB?r.add(e.bodyB.position,e.pointB):e.pointB,s=r.magnitude(r.sub(i,n));e.length=void 0!==e.length?e.length:s,e.id=e.id||l.nextId(),e.label=e.label||"Constraint",e.type="constraint",e.stiffness=e.stiffness||(e.length>0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(s.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}},n.pointAWorld=function(t){return{x:(t.bodyA?t.bodyA.position.x:0)+t.pointA.x,y:(t.bodyA?t.bodyA.position.y:0)+t.pointA.y}},n.pointBWorld=function(t){return{x:(t.bodyB?t.bodyB.position.x:0)+t.pointB.x,y:(t.bodyB?t.bodyB.position.y:0)+t.pointB.y}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(142);t.exports=function(t,e,i){var s=n(t,e,!0,i),r=n(t,e-1,!0,i),o=n(t,e+1,!0,i),a=n(t-1,e,!0,i),h=n(t+1,e,!0,i),l=s&&s.collides;return l&&(s.faceTop=!0,s.faceBottom=!0,s.faceLeft=!0,s.faceRight=!0),r&&r.collides&&(l&&(s.faceTop=!1),r.faceBottom=!l),o&&o.collides&&(l&&(s.faceBottom=!1),o.faceTop=!l),a&&a.collides&&(l&&(s.faceLeft=!1),a.faceRight=!l),h&&h.collides&&(l&&(s.faceRight=!1),h.faceLeft=!l),s&&!s.collides&&s.resetFaces(),s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(74),s=i(101),r=i(220),o=i(73);t.exports=function(t,e,i,a,h){if(!s(e,i,h))return null;void 0===a&&(a=!0);var l=h.data[i][e],u=l&&l.collides;if(t instanceof n)null===h.data[i][e]&&(h.data[i][e]=new n(h,t.index,e,i,t.width,t.height)),h.data[i][e].copy(t);else{var c=t;null===h.data[i][e]?h.data[i][e]=new n(h,c,e,i,h.tileWidth,h.tileHeight):h.data[i][e].index=c}var d=h.data[i][e],f=-1!==h.collideIndexes.indexOf(d.index);return o(d,f),a&&u!==d.collides&&r(e,i,h),d}},function(t,e){t.exports=function(t,e,i){var n=i.collideIndexes.indexOf(t);e&&-1===n?i.collideIndexes.push(t):e||-1===n||i.collideIndexes.splice(n,1)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(32),s=i(102),r=i(103),o=i(74);t.exports=function(t,e,i,a,h){for(var l=new s({tileWidth:i,tileHeight:a}),u=new r({name:t,tileWidth:i,tileHeight:a,format:n.ARRAY_2D,layers:[l]}),c=[],d=e.length,f=0,p=0;p * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(2);t.exports=function(t,e,i){if(!e)return{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0};var s=e.x+n(e,"startx",0)*t.tilewidth+n(e,"offsetx",0),r=e.y+n(e,"starty",0)*t.tileheight+n(e,"offsety",0);return{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+s,y:i.y+r}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(485),s=i(224),r=function(t){return{x:t.x,y:t.y}},o=["id","name","type","rotation","properties","visible","x","y","width","height"];t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var a=n(t,o);if(a.x+=e,a.y+=i,t.gid){var h=s(t.gid);a.gid=h.gid,a.flippedHorizontal=h.flippedHorizontal,a.flippedVertical=h.flippedVertical,a.flippedAntiDiagonal=h.flippedAntiDiagonal}else t.polyline?a.polyline=t.polyline.map(r):t.polygon?a.polygon=t.polygon.map(r):t.ellipse?a.ellipse=t.ellipse:t.text?a.text=t.text:t.point?a.point=!0:a.rectangle=!0;return a}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(32),s=i(103),r=i(477),o=i(493);t.exports=function(t,e,i,a,h,l,u,c){void 0===i&&(i=32),void 0===a&&(a=32),void 0===h&&(h=10),void 0===l&&(l=10),void 0===c&&(c=!1);var d=null;if(Array.isArray(u))d=r(void 0!==e?e:"map",n.ARRAY_2D,u,i,a,c);else if(void 0!==e){var f=t.cache.tilemap.get(e);f?d=r(e,f.format,f.data,i,a,c):console.warn("No map data found for key "+e)}return null===d&&(d=new s({tileWidth:i,tileHeight:a,width:h,height:l})),new o(t,d)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(6);t.exports=function(t){var e=n(t,"targets",null);return null===e||("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e])),e}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ function i(t){return!!t.getActive&&"function"==typeof t.getActive}function n(t){return!!t.getStart&&"function"==typeof t.getStart}function s(t){return!!t.getEnd&&"function"==typeof t.getEnd}var r=function(t,e){var o,a,h=function(t,e,i){return i},l=function(t,e,i){return i},u=null,c=typeof e;if("number"===c)h=function(){return e};else if("string"===c){var d=e[0],f=parseFloat(e.substr(2));switch(d){case"+":h=function(t,e,i){return i+f};break;case"-":h=function(t,e,i){return i-f};break;case"*":h=function(t,e,i){return i*f};break;case"/":h=function(t,e,i){return i/f};break;default:h=function(){return parseFloat(e)}}}else if("function"===c)h=e;else if("object"===c)if(n(a=e)||s(a)||i(a))i(e)&&(u=e.getActive),s(e)&&(h=e.getEnd),n(e)&&(l=e.getStart);else if(e.hasOwnProperty("value"))o=r(t,e.value);else{var p=e.hasOwnProperty("to"),g=e.hasOwnProperty("from"),v=e.hasOwnProperty("start");if(p&&(g||v)){if(o=r(t,e.to),v){var m=r(t,e.start);o.getActive=m.getEnd}if(g){var y=r(t,e.from);o.getStart=y.getEnd}}}return o||(o={getActive:u,getEnd:h,getStart:l}),o};t.exports=r},function(t,e){t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(10),r=i(232),o=i(16),a=i(5),h=i(89),l=i(15),u=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.parent=t,this.parentIsTimeline=t.hasOwnProperty("isTimeline"),this.data=e,this.totalData=e.length,this.targets=i,this.totalTargets=i.length,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.startDelay=0,this.hasStarted=!1,this.isSeeking=!1,this.completeDelay=0,this.countdown=0,this.offset=0,this.calculatedOffset=0,this.state=h.PENDING_ADD,this._pausedState=h.INIT,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onActive:null,onComplete:null,onLoop:null,onRepeat:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},getValue:function(t){return void 0===t&&(t=0),this.data[t].current},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===h.ACTIVE},isPaused:function(){return this.state===h.PAUSED},hasTarget:function(t){return-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){void 0===i&&(i=!1);for(var n=0;n0&&(s.totalDuration+=s.t2*s.repeat),s.totalDuration>t&&(t=s.totalDuration),s.delay0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay,this.startDelay=e},init:function(){if(this.paused&&!this.parentIsTimeline)return this.state=h.PENDING_ADD,this._pausedState=h.INIT,!1;for(var t=this.data,e=this.totalTargets,i=0;i0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=h.LOOP_DELAY):(this.state=h.ACTIVE,this.dispatchTweenEvent(r.TWEEN_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=h.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=h.PENDING_REMOVE,this.dispatchTweenEvent(r.TWEEN_COMPLETE,this.callbacks.onComplete))},pause:function(){return this.state===h.PAUSED||(this.paused=!0,this._pausedState=this.state,this.state=h.PAUSED),this},play:function(t){void 0===t&&(t=!1);var e=this.state;return e!==h.INIT||this.parentIsTimeline?e===h.ACTIVE||e===h.PENDING_ADD&&this._pausedState===h.PENDING_ADD?this:this.parentIsTimeline||e!==h.PENDING_REMOVE&&e!==h.REMOVED?(this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?this.state=h.ACTIVE:(this.countdown=this.calculatedOffset,this.state=h.OFFSET_DELAY)):this.paused?(this.paused=!1,this.makeActive()):(this.resetTweenData(t),this.state=h.ACTIVE,this.makeActive()),this):(this.seek(0),this.parent.makeActive(this),this):(this.resetTweenData(!1),this.state=h.ACTIVE,this)},resetTweenData:function(t){for(var e=this.data,i=this.totalData,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY),r.getActiveValue&&(o[a]=r.getActiveValue(r.target,r.key,r.start))}},resume:function(){return this.state===h.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t,e){if(void 0===e&&(e=16.6),this.totalDuration>=36e5)return console.warn("Tween.seek duration too long"),this;this.state===h.REMOVED&&this.makeActive(),this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0;for(var i=this.data,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY)}this.calcDuration();var c=!1;this.state===h.PAUSED&&(c=!0,this.state=h.ACTIVE),this.isSeeking=!0;do{this.update(0,e)}while(this.totalProgress0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.start=e.getStartValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},setStateFromStart:function(t,e,i){return e.repeatCounter>0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},updateTweenData:function(t,e,i){var n=e.target;switch(e.state){case h.PLAYING_FORWARD:case h.PLAYING_BACKWARD:if(!n){e.state=h.COMPLETE;break}var s=e.elapsed,o=e.duration,a=0;(s+=i)>o&&(a=s-o,s=o);var l=e.state===h.PLAYING_FORWARD,u=s/o;if(e.elapsed=s,e.progress=u,e.previous=e.current,1===u)l?(e.current=e.end,n[e.key]=e.end,e.hold>0?(e.elapsed=e.hold-a,e.state=h.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,a)):(e.current=e.start,n[e.key]=e.start,e.state=this.setStateFromStart(t,e,a));else{var c=l?e.ease(u):e.ease(1-u);e.current=e.start+(e.end-e.start)*c,n[e.key]=e.current}this.dispatchTweenDataEvent(r.TWEEN_UPDATE,t.callbacks.onUpdate,e);break;case h.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PENDING_RENDER);break;case h.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PLAYING_FORWARD,this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e));break;case h.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case h.PENDING_RENDER:n?(e.start=e.getStartValue(n,e.key,n[e.key],e.index,t.totalTargets,t),e.end=e.getEndValue(n,e.key,e.start,e.index,t.totalTargets,t),e.current=e.start,n[e.key]=e.start,e.state=h.PLAYING_FORWARD):e.state=h.COMPLETE}return e.state!==h.COMPLETE}});u.TYPES=["onActive","onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],a.register("tween",(function(t){return this.scene.sys.tweens.add(t)})),o.register("tween",(function(t){return this.scene.sys.tweens.create(t)})),t.exports=u},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={TIMELINE_COMPLETE:i(1356),TIMELINE_LOOP:i(1357),TIMELINE_PAUSE:i(1358),TIMELINE_RESUME:i(1359),TIMELINE_START:i(1360),TIMELINE_UPDATE:i(1361),TWEEN_ACTIVE:i(1362),TWEEN_COMPLETE:i(1363),TWEEN_LOOP:i(1364),TWEEN_REPEAT:i(1365),TWEEN_START:i(1366),TWEEN_UPDATE:i(1367),TWEEN_YOYO:i(1368)}},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p){return{target:t,index:e,key:i,getActiveValue:r,getEndValue:n,getStartValue:s,ease:o,duration:0,totalDuration:0,delay:0,yoyo:l,hold:0,repeat:0,repeatDelay:0,flipX:f,flipY:p,progress:0,elapsed:0,repeatCounter:0,start:0,previous:0,current:0,end:0,t1:0,t2:0,gen:{delay:a,duration:h,hold:u,repeat:c,repeatDelay:d},state:0}}},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(58);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(58);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(66),r=i(2),o=i(238),a=i(339),h=i(340),l=i(29),u=i(9),c=i(147),d=new n({Extends:c,Mixins:[o],initialize:function(t){var e=t.renderer.config;c.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:r(t,"topology",t.renderer.gl.TRIANGLES),vertShader:r(t,"vertShader",h),fragShader:r(t,"fragShader",a),vertexCapacity:r(t,"vertexCapacity",6*e.batchSize),vertexSize:r(t,"vertexSize",5*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT),attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTexCoord",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:2*Float32Array.BYTES_PER_ELEMENT},{name:"inTintEffect",size:1,type:t.renderer.gl.FLOAT,normalized:!1,offset:4*Float32Array.BYTES_PER_ELEMENT},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:5*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=e.batchSize,this.batches=[],this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.tintEffect=2,this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[],this.mvpInit()},onBind:function(){return c.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return c.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},setTexture2D:function(t,e){return void 0===t&&(t=this.renderer.blankTexture.glTexture),void 0===e&&(e=0),this.requireTextureBatch(t,e)&&this.pushBatch(t,e),this},requireTextureBatch:function(t,e){var i=this.batches,n=i.length;return!(n>0&&(e>0?i[n-1].textures[e-1]:i[n-1].texture)===t)},pushBatch:function(t,e){if(0===e)this.batches.push({first:this.vertexCount,texture:t,textures:[]});else{var i=[];i[e-1]=t,this.batches.push({first:this.vertexCount,texture:null,textures:i})}},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.vertexCount,r=this.topology,o=this.vertexSize,a=this.renderer,h=this.batches,l=h.length,u=0,c=null;if(0===l||0===s)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,s*o));for(var d=0;d0){for(e=0;e0){for(e=0;e0&&(a.setTexture2D(c.texture,0,!1),n.drawArrays(r,c.first,u)),this.vertexCount=0,h.length=0,this.flushLocked=!1,this},batchSprite:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix1,s=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,l=o.v0,c=o.u1,d=o.v1,f=o.x,p=o.y,g=o.cutWidth,v=o.cutHeight,m=o.customPivot,y=t.displayOriginX,x=t.displayOriginY,T=-y+f,w=-x+p;if(t.isCropped){var b=t._crop;b.flipX===t.flipX&&b.flipY===t.flipY||o.updateCropUVs(b,t.flipX,t.flipY),h=b.u0,l=b.v0,c=b.u1,d=b.v1,g=b.width,v=b.height,T=-y+(f=b.x),w=-x+(p=b.y)}var E=1,S=1;t.flipX&&(m||(T+=-o.realWidth+2*y),E=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(m||(w+=-o.realHeight+2*x),S=-1),s.applyITRS(t.x,t.y,t.rotation,t.scaleX*E,t.scaleY*S),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),s.e=t.x,s.f=t.y,n.multiply(s,r)):(s.e-=e.scrollX*t.scrollFactorX,s.f-=e.scrollY*t.scrollFactorY,n.multiply(s,r));var _=T+g,A=w+v,C=r.getX(T,w),M=r.getY(T,w),P=r.getX(T,A),O=r.getY(T,A),R=r.getX(_,A),L=r.getY(_,A),D=r.getX(_,w),k=r.getY(_,w),F=u.getTintAppendFloatAlpha(t._tintTL,e.alpha*t._alphaTL),I=u.getTintAppendFloatAlpha(t._tintTR,e.alpha*t._alphaTR),B=u.getTintAppendFloatAlpha(t._tintBL,e.alpha*t._alphaBL),N=u.getTintAppendFloatAlpha(t._tintBR,e.alpha*t._alphaBR);e.roundPixels&&(C=Math.round(C),M=Math.round(M),P=Math.round(P),O=Math.round(O),R=Math.round(R),L=Math.round(L),D=Math.round(D),k=Math.round(k)),this.setTexture2D(a,0);var Y=t._isTinted&&t.tintFill;this.batchQuad(C,M,P,O,R,L,D,k,h,l,c,d,F,I,B,N,Y,a,0)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y){var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,this.setTexture2D(m,y));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),this.setTexture2D(p,g),v=!0);var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y,x,T,w,b,E,S,_,A,C,M,P,O){this.renderer.setPipeline(this,t);var R=this._tempMatrix1,L=this._tempMatrix2,D=this._tempMatrix3,k=m/i+A,F=y/n+C,I=(m+x)/i+A,B=(y+T)/n+C,N=o,Y=a,X=-g,U=-v;if(t.isCropped){var z=t._crop;N=z.width,Y=z.height,o=z.width,a=z.height;var G=m=z.x,W=y=z.y;c&&(G=x-z.x-z.width),d&&!e.isRenderTexture&&(W=T-z.y-z.height),k=G/i+A,F=W/n+C,I=(G+z.width)/i+A,B=(W+z.height)/n+C,X=-g+m,U=-v+y}c&&(N*=-1,X+=o),(d^=!O&&e.isRenderTexture?1:0)&&(Y*=-1,U+=a);var V=X+N,H=U+Y;L.applyITRS(s,r,u,h,l),R.copyFrom(M.matrix),P?(R.multiplyWithOffset(P,-M.scrollX*f,-M.scrollY*p),L.e=s,L.f=r,R.multiply(L,D)):(L.e-=M.scrollX*f,L.f-=M.scrollY*p,R.multiply(L,D));var j=D.getX(X,U),q=D.getY(X,U),K=D.getX(X,H),J=D.getY(X,H),Z=D.getX(V,H),Q=D.getY(V,H),$=D.getX(V,U),tt=D.getY(V,U);M.roundPixels&&(j=Math.round(j),q=Math.round(q),K=Math.round(K),J=Math.round(J),Z=Math.round(Z),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt)),this.setTexture2D(e,0),this.batchQuad(j,q,K,J,Z,Q,$,tt,k,F,I,B,w,b,E,S,_,e,0)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,l=e+t.width,c=i+t.height;o?a.multiply(o,h):h=a;var d=h.getX(e,i),f=h.getY(e,i),p=h.getX(e,c),g=h.getY(e,c),v=h.getX(l,c),m=h.getY(l,c),y=h.getX(l,i),x=h.getY(l,i);this.setTexture2D(t.glTexture,0),n=u.getTintAppendFloatAlpha(n,s),this.batchQuad(d,f,p,g,v,m,y,x,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,0)},drawFillRect:function(t,e,i,n,s,r){var o=t+i,a=e+n;this.setTexture2D();var h=u.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,h,h,h,h,2)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1;this.batchQuad(l,u,c,d,f,p,g,v,y,x,T,w,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.fillTint.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(l,u,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=s,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=this.tintEffect,f=0;f0&&H[4]?this.batchQuad(D,k,P,O,H[0],H[1],H[2],H[3],z,G,W,V,B,N,Y,X,I):(j[0]=D,j[1]=k,j[2]=P,j[3]=O,j[4]=1),h&&j[4]?this.batchQuad(C,M,R,L,j[0],j[1],j[2],j[3],z,G,W,V,B,N,Y,X,I):(H[0]=C,H[1]=M,H[2]=R,H[3]=L,H[4]=1)}}});t.exports=d},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),l=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var n={};t.exports=n;var s=i(240);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(t,e){for(var i=e*e*e,s=0;s0&&r.motion=r.sleepThreshold&&n.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else n.set(r,!1)}},n.afterCollisions=function(t,e){for(var i=e*e*e,s=0;sn._motionWakeThreshold*i&&n.set(l,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||s.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&s.trigger(t,"sleepEnd"))}},function(t,e,i){var n={};t.exports=n;var s=i(38);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r0){i||(i={}),n=e.split(" ");for(var l=0;l * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={AlignTo:i(526),Angle:i(527),Call:i(528),GetFirst:i(529),GetLast:i(530),GridAlign:i(531),IncAlpha:i(592),IncX:i(593),IncXY:i(594),IncY:i(595),PlaceOnCircle:i(596),PlaceOnEllipse:i(597),PlaceOnLine:i(598),PlaceOnRectangle:i(599),PlaceOnTriangle:i(600),PlayAnimation:i(601),PropertyValueInc:i(34),PropertyValueSet:i(25),RandomCircle:i(602),RandomEllipse:i(603),RandomLine:i(604),RandomRectangle:i(605),RandomTriangle:i(606),Rotate:i(607),RotateAround:i(608),RotateAroundDistance:i(609),ScaleX:i(610),ScaleXY:i(611),ScaleY:i(612),SetAlpha:i(613),SetBlendMode:i(614),SetDepth:i(615),SetHitArea:i(616),SetOrigin:i(617),SetRotation:i(618),SetScale:i(619),SetScaleX:i(620),SetScaleY:i(621),SetScrollFactor:i(622),SetScrollFactorX:i(623),SetScrollFactorY:i(624),SetTint:i(625),SetVisible:i(626),SetX:i(627),SetXY:i(628),SetY:i(629),ShiftPosition:i(630),Shuffle:i(631),SmootherStep:i(632),SmoothStep:i(633),Spread:i(634),ToggleVisible:i(635),WrapInRectangle:i(636)}},function(t,e,i){ /** * @author samme * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(105),s=[];s[n.BOTTOM_CENTER]=i(243),s[n.BOTTOM_LEFT]=i(244),s[n.BOTTOM_RIGHT]=i(245),s[n.LEFT_BOTTOM]=i(246),s[n.LEFT_CENTER]=i(247),s[n.LEFT_TOP]=i(248),s[n.RIGHT_BOTTOM]=i(249),s[n.RIGHT_CENTER]=i(250),s[n.RIGHT_TOP]=i(251),s[n.TOP_CENTER]=i(252),s[n.TOP_LEFT]=i(253),s[n.TOP_RIGHT]=i(254),t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(39),s=i(76),r=i(77),o=i(40);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)+a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(39),s=i(41),r=i(42),o=i(40);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)-i),o(t,n(e)+a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(39),s=i(43),r=i(44),o=i(40);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)+a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(39),s=i(41),r=i(45),o=i(44);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(78),s=i(41),r=i(79),o=i(44);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(41),s=i(46),r=i(44),o=i(40);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(39),s=i(43),r=i(45),o=i(42);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(78),s=i(43),r=i(79),o=i(42);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(43),s=i(46),r=i(42),o=i(40);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(76),s=i(46),r=i(45),o=i(77);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(41),s=i(46),r=i(45),o=i(42);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)-a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(43),s=i(46),r=i(45),o=i(44);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(105),s=[];s[n.BOTTOM_CENTER]=i(256),s[n.BOTTOM_LEFT]=i(257),s[n.BOTTOM_RIGHT]=i(258),s[n.CENTER]=i(259),s[n.LEFT_CENTER]=i(261),s[n.RIGHT_CENTER]=i(262),s[n.TOP_CENTER]=i(263),s[n.TOP_LEFT]=i(264),s[n.TOP_RIGHT]=i(265),s[n.LEFT_BOTTOM]=s[n.BOTTOM_LEFT],s[n.LEFT_TOP]=s[n.TOP_LEFT],s[n.RIGHT_BOTTOM]=s[n.BOTTOM_RIGHT],s[n.RIGHT_TOP]=s[n.TOP_RIGHT],t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(39),s=i(76),r=i(45),o=i(77);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(39),s=i(41),r=i(45),o=i(42);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(39),s=i(43),r=i(45),o=i(44);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(260),s=i(76),r=i(78);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(77),s=i(79);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(78),s=i(41),r=i(79),o=i(42);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(78),s=i(43),r=i(79),o=i(44);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(76),s=i(46),r=i(77),o=i(40);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(41),s=i(46),r=i(42),o=i(40);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(43),s=i(46),r=i(44),o=i(40);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(149),s=i(87),r=i(15),o=i(4);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(268),s=i(149),r=i(87),o=i(15);t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(e=n(t)/i);for(var h=0;h * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(19),s={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=s},function(t,e){t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var n,s,r=1;if(i){if(te.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(52),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){t.exports={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(152),s=i(112);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=s(t)/i);for(var o=0;o * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x-e,a=t.y-i;return t.x=o*s-a*r+e,t.y=o*r+a*s+i,t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(278),s=i(279),r={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t){return void 0===t&&(this.texture||this.shader)&&(t=this),new n(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new s(this.scene,t)}};t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(20),r=new n({initialize:function(t,e){var i=t.sys.game.renderer;if(this.renderer=i,this.bitmapMask=e,this.maskTexture=null,this.mainTexture=null,this.dirty=!0,this.mainFramebuffer=null,this.maskFramebuffer=null,this.prevFramebuffer=null,this.invertAlpha=!1,this.isStencil=!1,i&&i.gl){var n=i.width,r=i.height,o=0==(n&n-1)&&0==(r&r-1),a=i.gl,h=o?a.REPEAT:a.CLAMP_TO_EDGE,l=a.LINEAR;this.mainTexture=i.createTexture2D(0,l,l,h,h,a.RGBA,null,n,r),this.maskTexture=i.createTexture2D(0,l,l,h,h,a.RGBA,null,n,r),this.mainFramebuffer=i.createFramebuffer(n,r,this.mainTexture,!0),this.maskFramebuffer=i.createFramebuffer(n,r,this.maskTexture,!0),t.sys.game.events.on(s.CONTEXT_RESTORED,(function(t){var e=t.width,i=t.height,n=0==(e&e-1)&&0==(i&i-1),s=t.gl,r=n?s.REPEAT:s.CLAMP_TO_EDGE,o=s.LINEAR;this.mainTexture=t.createTexture2D(0,o,o,r,r,s.RGBA,null,e,i),this.maskTexture=t.createTexture2D(0,o,o,r,r,s.RGBA,null,e,i),this.mainFramebuffer=t.createFramebuffer(e,i,this.mainTexture,!0),this.maskFramebuffer=t.createFramebuffer(e,i,this.maskTexture,!0)}),this)}},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BitmapMaskPipeline.beginMask(this,e,i)},postRenderWebGL:function(t,e){t.pipelines.BitmapMaskPipeline.endMask(this,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null;var t=this.renderer;t&&t.gl&&(t.deleteTexture(this.mainTexture),t.deleteTexture(this.maskTexture),t.deleteFramebuffer(this.mainFramebuffer),t.deleteFramebuffer(this.maskFramebuffer)),this.mainTexture=null,this.maskTexture=null,this.mainFramebuffer=null,this.maskFramebuffer=null,this.prevFramebuffer=null,this.renderer=null}});t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var n=t.gl;t.flush(),0===t.maskStack.length&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var n=t.gl,s=this.geometryMask,r=t.maskCount;n.colorMask(!1,!1,!1,!1),i?(n.stencilFunc(n.EQUAL,r,255),n.stencilOp(n.KEEP,n.KEEP,n.INCR)):(n.stencilFunc(n.EQUAL,r+1,255),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),s.renderWebGL(t,s,0,e),t.flush(),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),i?this.invertAlpha?n.stencilFunc(n.NOTEQUAL,r+1,255):n.stencilFunc(n.EQUAL,r+1,255):this.invertAlpha?n.stencilFunc(n.NOTEQUAL,r,255):n.stencilFunc(n.EQUAL,r,255)},postRenderWebGL:function(t){var e=t.gl;if(t.maskStack.pop(),t.maskCount--,0===t.maskStack.length)t.flush(),t.currentMask.mask=null,e.disable(e.STENCIL_TEST);else{t.flush();var i=t.maskStack[t.maskStack.length-1];i.mask.applyStencil(t,i.camera,!1),t.currentCameraMask.mask!==i.mask?(t.currentMask.mask=i.mask,t.currentMask.camera=i.camera):t.currentMask.mask=null}},preRenderCanvas:function(t,e,i){var n=this.geometryMask;t.currentContext.save(),n.renderCanvas(t,n,0,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=n},function(t,e){t.exports={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}}},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(15),s=i(29),r=i(235),o=i(236),a={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return o(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=r(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRandomPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new s),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new s),void 0===e&&(e=new s);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=a},function(t,e){t.exports={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={CHANGE_DATA:i(577),CHANGE_DATA_KEY:i(578),REMOVE_DATA:i(579),SET_DATA:i(580)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(112),s=i(4);t.exports=function(t,e,i,r){if(void 0===r&&(r=[]),!e&&!i)return r;e?i=Math.round(n(t)/e):e=n(t)/i;for(var o=t.x,a=t.y,h=0,l=0;l=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=l),f * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(151),s=i(0),r=i(162),o=i(10),a=i(111),h=i(20),l=i(6),u=i(163),c=new s({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},add:function(t,e){return this.anims.has(t)?(console.warn("Animation key exists: "+t),this):(e.key=t,this.anims.set(t,e),this.emit(a.ADD_ANIMATION,t,e),this)},exists:function(t){return this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new n(this,e,t),this.anims.set(e,i),this.emit(a.ADD_ANIMATION,e,i))),i},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(162),r=i(10),o=i(291),a=new n({initialize:function(){this.entries=new s,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit(o.ADD,this,t,e),this},has:function(t){return this.entries.has(t)},exists:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit(o.REMOVE,this,t,e.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={ADD:i(639),REMOVE:i(640)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(290),s=i(0),r=i(20),o=new s({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.video=new n,this.text=new n,this.html=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once(r.DESTROY,this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(91),s=i(26),r=i(168),o=i(19),a=i(0),h=i(12),l=i(301),u=i(116),c=i(11),d=i(3),f=new a({Extends:n,Mixins:[h.Flip,h.Tint],initialize:function(t,e,i,s){n.call(this,t,e,i,s),this.inputEnabled=!0,this.fadeEffect=new l.Fade(this),this.flashEffect=new l.Flash(this),this.shakeEffect=new l.Shake(this),this.panEffect=new l.Pan(this),this.rotateToEffect=new l.RotateTo(this),this.zoomEffect=new l.Zoom(this),this.lerp=new d(1,1),this.followOffset=new d,this.deadzone=null,this._follow=null,this.renderToTexture=!1,this.renderToGame=!0,this.canvas=null,this.context=null,this.glTexture=null,this.framebuffer=null,this.pipeline=null},setRenderToTexture:function(t,e){void 0===e&&(e=!0);var i=this.scene.sys.game.renderer;return i.gl?(this.glTexture=i.createTextureFromSource(null,this.width,this.height,0),this.framebuffer=i.createFramebuffer(this.width,this.height,this.glTexture,!1)):(this.canvas=s.create2D(this,this.width,this.height),this.context=this.canvas.getContext("2d")),this.renderToTexture=!0,this.renderToGame=e,t&&this.setPipeline(t),this},setPipeline:function(t){if("string"==typeof t){var e=this.scene.sys.game.renderer;e.gl&&e.hasPipeline(t)&&(this.pipeline=e.getPipeline(t))}else this.pipeline=t;return this},clearRenderToTexture:function(){if(this.scene){var t=this.scene.sys.game.renderer;if(t)return t.gl?(this.framebuffer&&t.deleteFramebuffer(this.framebuffer),this.glTexture&&t.deleteTexture(this.glTexture),this.framebuffer=null,this.glTexture=null,this.pipeline=null):(s.remove(this),this.canvas=null,this.context=null),this.renderToTexture=!1,this}},setDeadzone:function(t,e){if(void 0===t)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=t,this.deadzone.height=e):this.deadzone=new c(0,0,t,e),this._follow){var i=this.width/2,n=this.height/2,s=this._follow.x-this.followOffset.x,o=this._follow.y-this.followOffset.y;this.midPoint.set(s,o),this.scrollX=s-i,this.scrollY=o-n}r(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(t,e,i,n,s,r){return this.fadeEffect.start(!1,t,e,i,n,!0,s,r)},fadeOut:function(t,e,i,n,s,r){return this.fadeEffect.start(!0,t,e,i,n,!0,s,r)},fadeFrom:function(t,e,i,n,s,r,o){return this.fadeEffect.start(!1,t,e,i,n,s,r,o)},fade:function(t,e,i,n,s,r,o){return this.fadeEffect.start(!0,t,e,i,n,s,r,o)},flash:function(t,e,i,n,s,r,o){return this.flashEffect.start(t,e,i,n,s,r,o)},shake:function(t,e,i,n,s){return this.shakeEffect.start(t,e,i,n,s)},pan:function(t,e,i,n,s,r,o){return this.panEffect.start(t,e,i,n,s,r,o)},rotateTo:function(t,e,i,n,s,r,o){return this.rotateToEffect.start(t,e,i,n,s,r,o)},zoomTo:function(t,e,i,n,s,r){return this.zoomEffect.start(t,e,i,n,s,r)},preRender:function(t){var e=this.width,i=this.height,n=.5*e,s=.5*i,o=this.zoom*t,a=this.matrix,h=e*this.originX,l=i*this.originY,c=this._follow,d=this.deadzone,f=this.scrollX,p=this.scrollY;if(d&&r(d,this.midPoint.x,this.midPoint.y),c&&!this.panEffect.isRunning){var g=c.x-this.followOffset.x,v=c.y-this.followOffset.y;d?(gd.right&&(f=u(f,f+(g-d.right),this.lerp.x)),vd.bottom&&(p=u(p,p+(v-d.bottom),this.lerp.y))):(f=u(f,g-h,this.lerp.x),p=u(p,v-l,this.lerp.y))}this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(h=Math.round(h),l=Math.round(l)),this.scrollX=f,this.scrollY=p;var m=f+n,y=p+s;this.midPoint.set(m,y);var x=e/o,T=i/o;this.worldView.setTo(m-x/2,y-T/2,x,T),a.applyITRS(this.x+h,this.y+l,this.rotation,o,o),a.translate(-h,-l),this.shakeEffect.preRender()},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=o(i,0,1),n=o(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var a=this.width/2,h=this.height/2,l=t.x-s,u=t.y-r;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.clearRenderToTexture(),this.resetFX(),n.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=f},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(31);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,n){return e+e+i+i+n+n}));var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(31),s=i(298);t.exports=function(t){var e=s(t);return new n(e.r,e.g,e.b,e.a)}},function(t,e){t.exports=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(31);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(31);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Fade:i(663),Flash:i(664),Pan:i(665),Shake:i(698),RotateTo:i(699),Zoom:i(700)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(666),Out:i(667),InOut:i(668)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(669),Out:i(670),InOut:i(671)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(672),Out:i(673),InOut:i(674)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(675),Out:i(676),InOut:i(677)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(678),Out:i(679),InOut:i(680)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(681),Out:i(682),InOut:i(683)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports=i(684)},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(685),Out:i(686),InOut:i(687)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(688),Out:i(689),InOut:i(690)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(691),Out:i(692),InOut:i(693)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(694),Out:i(695),InOut:i(696)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports=i(697)},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(33),r=i(315),o=i(2),a=i(6),h=i(7),l=i(170),u=i(1),c=i(175),d=i(164),f=new n({initialize:function(t){void 0===t&&(t={}),this.width=a(t,"width",1024),this.height=a(t,"height",768),this.zoom=a(t,"zoom",1),this.resolution=a(t,"resolution",1),this.parent=a(t,"parent",void 0),this.scaleMode=a(t,"scaleMode",0),this.expandParent=a(t,"expandParent",!0),this.autoRound=a(t,"autoRound",!1),this.autoCenter=a(t,"autoCenter",0),this.resizeInterval=a(t,"resizeInterval",500),this.fullscreenTarget=a(t,"fullscreenTarget",null),this.minWidth=a(t,"minWidth",0),this.maxWidth=a(t,"maxWidth",0),this.minHeight=a(t,"minHeight",0),this.maxHeight=a(t,"maxHeight",0);var e=a(t,"scale",null);e&&(this.width=a(e,"width",this.width),this.height=a(e,"height",this.height),this.zoom=a(e,"zoom",this.zoom),this.resolution=a(e,"resolution",this.resolution),this.parent=a(e,"parent",this.parent),this.scaleMode=a(e,"mode",this.scaleMode),this.expandParent=a(e,"expandParent",this.expandParent),this.autoRound=a(e,"autoRound",this.autoRound),this.autoCenter=a(e,"autoCenter",this.autoCenter),this.resizeInterval=a(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=a(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=a(e,"min.width",this.minWidth),this.maxWidth=a(e,"max.width",this.maxWidth),this.minHeight=a(e,"min.height",this.minHeight),this.maxHeight=a(e,"max.height",this.maxHeight)),this.renderType=a(t,"type",s.AUTO),this.canvas=a(t,"canvas",null),this.context=a(t,"context",null),this.canvasStyle=a(t,"canvasStyle",null),this.customEnvironment=a(t,"customEnvironment",!1),this.sceneConfig=a(t,"scene",null),this.seed=a(t,"seed",[(Date.now()*Math.random()).toString()]),l.RND=new l.RandomDataGenerator(this.seed),this.gameTitle=a(t,"title",""),this.gameURL=a(t,"url","https://phaser.io"),this.gameVersion=a(t,"version",""),this.autoFocus=a(t,"autoFocus",!0),this.domCreateContainer=a(t,"dom.createContainer",!1),this.domBehindCanvas=a(t,"dom.behindCanvas",!1),this.inputKeyboard=a(t,"input.keyboard",!0),this.inputKeyboardEventTarget=a(t,"input.keyboard.target",window),this.inputKeyboardCapture=a(t,"input.keyboard.capture",[]),this.inputMouse=a(t,"input.mouse",!0),this.inputMouseEventTarget=a(t,"input.mouse.target",null),this.inputMouseCapture=a(t,"input.mouse.capture",!0),this.inputTouch=a(t,"input.touch",r.input.touch),this.inputTouchEventTarget=a(t,"input.touch.target",null),this.inputTouchCapture=a(t,"input.touch.capture",!0),this.inputActivePointers=a(t,"input.activePointers",1),this.inputSmoothFactor=a(t,"input.smoothFactor",0),this.inputWindowEvents=a(t,"input.windowEvents",!0),this.inputGamepad=a(t,"input.gamepad",!1),this.inputGamepadEventTarget=a(t,"input.gamepad.target",window),this.disableContextMenu=a(t,"disableContextMenu",!1),this.audio=a(t,"audio"),this.hideBanner=!1===a(t,"banner",null),this.hidePhaser=a(t,"banner.hidePhaser",!1),this.bannerTextColor=a(t,"banner.text","#ffffff"),this.bannerBackgroundColor=a(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=a(t,"fps",null);var i=a(t,"render",t);this.antialias=a(i,"antialias",!0),this.antialiasGL=a(i,"antialiasGL",!0),this.mipmapFilter=a(i,"mipmapFilter","LINEAR"),this.desynchronized=a(i,"desynchronized",!1),this.roundPixels=a(i,"roundPixels",!1),this.pixelArt=a(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=a(i,"transparent",!1),this.clearBeforeRender=a(i,"clearBeforeRender",!0),this.premultipliedAlpha=a(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=a(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=a(i,"powerPreference","default"),this.batchSize=a(i,"batchSize",2e3),this.maxLights=a(i,"maxLights",10);var n=a(t,"backgroundColor",0);this.backgroundColor=d(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=a(t,"callbacks.preBoot",u),this.postBoot=a(t,"callbacks.postBoot",u),this.physics=a(t,"physics",{}),this.defaultPhysicsSystem=a(this.physics,"default",!1),this.loaderBaseURL=a(t,"loader.baseURL",""),this.loaderPath=a(t,"loader.path",""),this.loaderMaxParallelDownloads=a(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=a(t,"loader.crossOrigin",void 0),this.loaderResponseType=a(t,"loader.responseType",""),this.loaderAsync=a(t,"loader.async",!0),this.loaderUser=a(t,"loader.user",""),this.loaderPassword=a(t,"loader.password",""),this.loaderTimeout=a(t,"loader.timeout",0),this.loaderWithCredentials=a(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var f=a(t,"plugins",null),p=c.DefaultScene;f&&(Array.isArray(f)?this.defaultPlugins=f:h(f)&&(this.installGlobalPlugins=o(f,"global",[]),this.installScenePlugins=o(f,"scene",[]),Array.isArray(f.default)?p=f.default:Array.isArray(f.defaultMerge)&&(p=p.concat(f.defaultMerge)))),this.defaultPlugins=p;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=a(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=a(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=s.WEBGL:window.FORCE_CANVAS&&(this.renderType=s.CANVAS))}});t.exports=f},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={os:i(117),browser:i(118),features:i(169),input:i(729),audio:i(730),video:i(731),fullscreen:i(732),canvasFeatures:i(316)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(324);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e,i,n,s){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,n)+function(t,e){return t*t*t*e}(t,s)}},function(t,e){t.exports=function(t,e,i,n){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,n)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(161);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e){t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<0?Math.ceil(t):Math.floor(t)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(3);t.exports=function(t,e,i,s,r,o,a,h){void 0===h&&(h=new n);var l=Math.sin(r),u=Math.cos(r),c=u*o,d=l*o,f=-l*a,p=u*a,g=1/(c*p+f*-d);return h.x=p*g*t+-f*g*e+(s*f-i*p)*g,h.y=c*g*e+-d*g*t+(-s*c+i*d)*g,h}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t,e,i,n){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},clone:function(){return new n(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],m=c[5],y=c[6],x=c[7],T=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+m*h,e[4]=g*n+v*o+m*l,e[5]=g*s+v*a+m*u,e[6]=y*i+x*r+T*h,e[7]=y*n+x*o+T*l,e[8]=y*s+x*a+T*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,m=this.val;return m[0]=1-(c+f),m[3]=l+v,m[6]=u-g,m[1]=l-v,m[4]=1-(h+f),m[7]=d+p,m[2]=u+g,m[5]=d-p,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],m=e[14],y=e[15],x=n*h-s*a,T=n*l-r*a,w=n*u-o*a,b=s*l-r*h,E=s*u-o*h,S=r*u-o*l,_=c*v-d*g,A=c*m-f*g,C=c*y-p*g,M=d*m-f*v,P=d*y-p*v,O=f*y-p*m,R=x*O-T*P+w*M+b*C-E*A+S*_;return R?(R=1/R,i[0]=(h*O-l*P+u*M)*R,i[1]=(l*C-a*O-u*A)*R,i[2]=(a*P-h*C+u*_)*R,i[3]=(r*P-s*O-o*M)*R,i[4]=(n*O-r*C+o*A)*R,i[5]=(s*C-n*P-o*_)*R,i[6]=(v*S-m*E+y*b)*R,i[7]=(m*w-g*S-y*T)*R,i[8]=(g*E-v*w+y*x)*R,this):null}});t.exports=n},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=o,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15],m=e*o-i*r,y=e*a-n*r,x=e*h-s*r,T=i*a-n*o,w=i*h-s*o,b=n*h-s*a,E=l*p-u*f,S=l*g-c*f,_=l*v-d*f,A=u*g-c*p,C=u*v-d*p,M=c*v-d*g,P=m*M-y*C+x*A+T*_-w*S+b*E;return P?(P=1/P,t[0]=(o*M-a*C+h*A)*P,t[1]=(n*C-i*M-s*A)*P,t[2]=(p*b-g*w+v*T)*P,t[3]=(c*w-u*b-d*T)*P,t[4]=(a*_-r*M-h*S)*P,t[5]=(e*M-n*_+s*S)*P,t[6]=(g*x-f*b-v*y)*P,t[7]=(l*b-c*x+d*y)*P,t[8]=(r*C-o*_+h*E)*P,t[9]=(i*_-e*C-s*E)*P,t[10]=(f*w-p*x+v*m)*P,t[11]=(u*x-l*w-d*m)*P,t[12]=(o*S-r*A-a*E)*P,t[13]=(e*A-i*S+n*E)*P,t[14]=(p*y-f*T-g*m)*P,t[15]=(l*T-u*y+c*m)*P,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return t[0]=o*(c*v-d*g)-u*(a*v-h*g)+p*(a*d-h*c),t[1]=-(i*(c*v-d*g)-u*(n*v-s*g)+p*(n*d-s*c)),t[2]=i*(a*v-h*g)-o*(n*v-s*g)+p*(n*h-s*a),t[3]=-(i*(a*d-h*c)-o*(n*d-s*c)+u*(n*h-s*a)),t[4]=-(r*(c*v-d*g)-l*(a*v-h*g)+f*(a*d-h*c)),t[5]=e*(c*v-d*g)-l*(n*v-s*g)+f*(n*d-s*c),t[6]=-(e*(a*v-h*g)-r*(n*v-s*g)+f*(n*h-s*a)),t[7]=e*(a*d-h*c)-r*(n*d-s*c)+l*(n*h-s*a),t[8]=r*(u*v-d*p)-l*(o*v-h*p)+f*(o*d-h*u),t[9]=-(e*(u*v-d*p)-l*(i*v-s*p)+f*(i*d-s*u)),t[10]=e*(o*v-h*p)-r*(i*v-s*p)+f*(i*h-s*o),t[11]=-(e*(o*d-h*u)-r*(i*d-s*u)+l*(i*h-s*o)),t[12]=-(r*(u*g-c*p)-l*(o*g-a*p)+f*(o*c-a*u)),t[13]=e*(u*g-c*p)-l*(i*g-n*p)+f*(i*c-n*u),t[14]=-(e*(o*g-a*p)-r*(i*g-n*p)+f*(i*a-n*o)),t[15]=e*(o*c-a*u)-r*(i*c-n*u)+l*(i*a-n*o),this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return(e*o-i*r)*(c*v-d*g)-(e*a-n*r)*(u*v-d*p)+(e*h-s*r)*(u*g-c*p)+(i*a-n*o)*(l*v-d*f)-(i*h-s*o)*(l*g-c*f)+(n*h-s*a)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],v=e[14],m=e[15],y=t.val,x=y[0],T=y[1],w=y[2],b=y[3];return e[0]=x*i+T*o+w*u+b*p,e[1]=x*n+T*a+w*c+b*g,e[2]=x*s+T*h+w*d+b*v,e[3]=x*r+T*l+w*f+b*m,x=y[4],T=y[5],w=y[6],b=y[7],e[4]=x*i+T*o+w*u+b*p,e[5]=x*n+T*a+w*c+b*g,e[6]=x*s+T*h+w*d+b*v,e[7]=x*r+T*l+w*f+b*m,x=y[8],T=y[9],w=y[10],b=y[11],e[8]=x*i+T*o+w*u+b*p,e[9]=x*n+T*a+w*c+b*g,e[10]=x*s+T*h+w*d+b*v,e[11]=x*r+T*l+w*f+b*m,x=y[12],T=y[13],w=y[14],b=y[15],e[12]=x*i+T*o+w*u+b*p,e[13]=x*n+T*a+w*c+b*g,e[14]=x*s+T*h+w*d+b*v,e[15]=x*r+T*l+w*f+b*m,this},multiplyLocal:function(t){var e=[],i=this.val,n=t.val;return e[0]=i[0]*n[0]+i[1]*n[4]+i[2]*n[8]+i[3]*n[12],e[1]=i[0]*n[1]+i[1]*n[5]+i[2]*n[9]+i[3]*n[13],e[2]=i[0]*n[2]+i[1]*n[6]+i[2]*n[10]+i[3]*n[14],e[3]=i[0]*n[3]+i[1]*n[7]+i[2]*n[11]+i[3]*n[15],e[4]=i[4]*n[0]+i[5]*n[4]+i[6]*n[8]+i[7]*n[12],e[5]=i[4]*n[1]+i[5]*n[5]+i[6]*n[9]+i[7]*n[13],e[6]=i[4]*n[2]+i[5]*n[6]+i[6]*n[10]+i[7]*n[14],e[7]=i[4]*n[3]+i[5]*n[7]+i[6]*n[11]+i[7]*n[15],e[8]=i[8]*n[0]+i[9]*n[4]+i[10]*n[8]+i[11]*n[12],e[9]=i[8]*n[1]+i[9]*n[5]+i[10]*n[9]+i[11]*n[13],e[10]=i[8]*n[2]+i[9]*n[6]+i[10]*n[10]+i[11]*n[14],e[11]=i[8]*n[3]+i[9]*n[7]+i[10]*n[11]+i[11]*n[15],e[12]=i[12]*n[0]+i[13]*n[4]+i[14]*n[8]+i[15]*n[12],e[13]=i[12]*n[1]+i[13]*n[5]+i[14]*n[9]+i[15]*n[13],e[14]=i[12]*n[2]+i[13]*n[6]+i[14]*n[10]+i[15]*n[14],e[15]=i[12]*n[3]+i[13]*n[7]+i[14]*n[11]+i[15]*n[15],this.fromArray(e)},translate:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[12]=s[0]*e+s[4]*i+s[8]*n+s[12],s[13]=s[1]*e+s[5]*i+s[9]*n+s[13],s[14]=s[2]*e+s[6]*i+s[10]*n+s[14],s[15]=s[3]*e+s[7]*i+s[11]*n+s[15],this},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[0]=s[0]*e,s[1]=s[1]*e,s[2]=s[2]*e,s[3]=s[3]*e,s[4]=s[4]*i,s[5]=s[5]*i,s[6]=s[6]*i,s[7]=s[7]*i,s[8]=s[8]*n,s[9]=s[9]*n,s[10]=s[10]*n,s[11]=s[11]*n,this},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,o=t.y,a=t.z,h=s*r,l=s*o;return this.fromArray([h*r+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*r,0,h*a-n*o,l*a+n*r,s*a*a+i,0,0,0,0,1]),this},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,r=e.z,o=Math.sqrt(n*n+s*s+r*r);if(Math.abs(o)<1e-6)return null;n*=o=1/o,s*=o,r*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],c=i[1],d=i[2],f=i[3],p=i[4],g=i[5],v=i[6],m=i[7],y=i[8],x=i[9],T=i[10],w=i[11],b=n*n*l+h,E=s*n*l+r*a,S=r*n*l-s*a,_=n*s*l-r*a,A=s*s*l+h,C=r*s*l+n*a,M=n*r*l+s*a,P=s*r*l-n*a,O=r*r*l+h;return i[0]=u*b+p*E+y*S,i[1]=c*b+g*E+x*S,i[2]=d*b+v*E+T*S,i[3]=f*b+m*E+w*S,i[4]=u*_+p*A+y*C,i[5]=c*_+g*A+x*C,i[6]=d*_+v*A+T*C,i[7]=f*_+m*A+w*C,i[8]=u*M+p*P+y*O,i[9]=c*M+g*P+x*O,i[10]=d*M+v*P+T*O,i[11]=f*M+m*P+w*O,this},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this},fromRotationTranslation:function(t,e){var i=this.val,n=t.x,s=t.y,r=t.z,o=t.w,a=n+n,h=s+s,l=r+r,u=n*a,c=n*h,d=n*l,f=s*h,p=s*l,g=r*l,v=o*a,m=o*h,y=o*l;return i[0]=1-(f+g),i[1]=c+y,i[2]=d-m,i[3]=0,i[4]=c-y,i[5]=1-(u+g),i[6]=p+v,i[7]=0,i[8]=d+m,i[9]=p-v,i[10]=1-(u+f),i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},fromQuat:function(t){var e=this.val,i=t.x,n=t.y,s=t.z,r=t.w,o=i+i,a=n+n,h=s+s,l=i*o,u=i*a,c=i*h,d=n*a,f=n*h,p=s*h,g=r*o,v=r*a,m=r*h;return e[0]=1-(d+p),e[1]=u+m,e[2]=c-v,e[3]=0,e[4]=u-m,e[5]=1-(l+p),e[6]=f+g,e[7]=0,e[8]=c+v,e[9]=f-g,e[10]=1-(l+d),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,i,n,s,r){var o=this.val,a=1/(e-t),h=1/(n-i),l=1/(s-r);return o[0]=2*s*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*s*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(n+i)*h,o[10]=(r+s)*l,o[11]=-1,o[12]=0,o[13]=0,o[14]=r*s*2*l,o[15]=0,this},perspective:function(t,e,i,n){var s=this.val,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this},perspectiveLH:function(t,e,i,n){var s=this.val;return s[0]=2*i/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*i/e,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-n/(i-n),s[11]=1,s[12]=0,s[13]=0,s[14]=i*n/(i-n),s[15]=0,this},ortho:function(t,e,i,n,s,r){var o=this.val,a=t-e,h=i-n,l=s-r;return a=0===a?a:1/a,h=0===h?h:1/h,l=0===l?l:1/l,o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this},lookAt:function(t,e,i){var n=this.val,s=t.x,r=t.y,o=t.z,a=i.x,h=i.y,l=i.z,u=e.x,c=e.y,d=e.z;if(Math.abs(s-u)<1e-6&&Math.abs(r-c)<1e-6&&Math.abs(o-d)<1e-6)return this.identity();var f=s-u,p=r-c,g=o-d,v=1/Math.sqrt(f*f+p*p+g*g),m=h*(g*=v)-l*(p*=v),y=l*(f*=v)-a*g,x=a*p-h*f;(v=Math.sqrt(m*m+y*y+x*x))?(m*=v=1/v,y*=v,x*=v):(m=0,y=0,x=0);var T=p*x-g*y,w=g*m-f*x,b=f*y-p*m;return(v=Math.sqrt(T*T+w*w+b*b))?(T*=v=1/v,w*=v,b*=v):(T=0,w=0,b=0),n[0]=m,n[1]=T,n[2]=f,n[3]=0,n[4]=y,n[5]=w,n[6]=p,n[7]=0,n[8]=x,n[9]=b,n[10]=g,n[11]=0,n[12]=-(m*s+y*r+x*o),n[13]=-(T*s+w*r+b*o),n[14]=-(f*s+p*r+g*o),n[15]=1,this},yawPitchRoll:function(t,e,i){this.zero(),s.zero(),r.zero();var n=this.val,o=s.val,a=r.val,h=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=h,n[4]=-h,n[5]=l,h=Math.sin(e),l=Math.cos(e),o[0]=1,o[15]=1,o[5]=l,o[10]=l,o[9]=-h,o[6]=h,h=Math.sin(t),l=Math.cos(t),a[5]=1,a[15]=1,a[0]=l,a[2]=-h,a[8]=h,a[10]=l,this.multiplyLocal(s),this.multiplyLocal(r),this},setWorldMatrix:function(t,e,i,n,o){return this.yawPitchRoll(t.y,t.x,t.z),s.scaling(i.x,i.y,i.z),r.xyz(e.x,e.y,e.z),this.multiplyLocal(s),this.multiplyLocal(r),void 0!==n&&this.multiplyLocal(n),void 0!==o&&this.multiplyLocal(o),this}}),s=new n,r=new n;t.exports=n},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(174),r=i(334),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(338),s=i(26),r=i(33),o=i(169);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.CANVAS||e.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=r.CANVAS}else e.renderType=r.WEBGL;e.antialias||s.disableSmoothing();var a,h,l=t.scale.baseSize,u=l.width,c=l.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=s.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||n.setCrisp(t.canvas),e.renderType!==r.HEADLESS&&(a=i(504),h=i(507),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach((function(e){t.style["image-rendering"]=e})),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);"," vec4 color = texture;",""," if (outTintEffect == 0.0)"," {"," // Multiply texture tint"," color = texture * texel;"," }"," else if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);"," color.a = texture.a * texel.a;"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform mat4 uModelMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}","",""].join("\n")},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(33);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===n.CANVAS?i="Canvas":e.renderType===n.HEADLESS&&(i="Headless");var s,r=e.audio,o=t.device.audio;if(s=!o.webAudio||r&&r.disableWebAudio?r&&r.noAudio||!o.webAudio&&!o.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+n.VERSION+" / https://phaser.io");else{var a,h="",l=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach((function(t){h=h.concat("%c "),l.push("background: "+t),a=t})),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+a):(h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor)),l.push("background: #fff"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / "))),e.hidePhaser||(h=h.concat("Phaser v"+n.VERSION+" ("+i+" | "+s+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(6),r=i(1),o=i(343),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=s(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0),o=0;for(var a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step()},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var t=this;this.step=function e(){var i=window.performance.now();t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.min(Math.max(2*t.target+t.tick-i,0),t.target);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(20);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach((function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")})),e&&document.addEventListener(e,(function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)}),!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(346),s=i(26),r=i(6);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var g=i.getContext("2d");u&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;v * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(325),r=i(81),o=i(3),a=new n({Extends:r,initialize:function(t,e,i,n){r.call(this,"CubicBezierCurve"),Array.isArray(t)&&(n=new o(t[6],t[7]),i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i,this.p3=n},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,n=this.p1,r=this.p2,a=this.p3;return e.set(s(t,i.x,n.x,r.x,a.x),s(t,i.y,n.y,r.y,a.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var n=1;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(81),r=i(35),o=i(6),a=i(173),h=i(3),l=new n({Extends:s,initialize:function(t,e,i,n,a,l,u,c){if("object"==typeof t){var d=t;t=o(d,"x",0),e=o(d,"y",0),i=o(d,"xRadius",0),n=o(d,"yRadius",i),a=o(d,"startAngle",0),l=o(d,"endAngle",360),u=o(d,"clockwise",!1),c=o(d,"rotation",0)}else void 0===n&&(n=i),void 0===a&&(a=0),void 0===l&&(l=360),void 0===u&&(u=!1),void 0===c&&(c=0);s.call(this,"EllipseCurve"),this.p0=new h(t,e),this._xRadius=i,this._yRadius=n,this._startAngle=r(a),this._endAngle=r(l),this._clockwise=u,this._rotation=r(c)},getStartPoint:function(t){return void 0===t&&(t=new h),this.getPoint(0,t)},getResolution:function(t){return 2*t},getPoint:function(t,e){void 0===e&&(e=new h);for(var i=2*Math.PI,n=this._endAngle-this._startAngle,s=Math.abs(n)i;)n-=i;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(81),r=i(176),o=i(11),a=i(3),h=new a,l=new n({Extends:s,initialize:function(t,e){s.call(this,"LineCurve"),Array.isArray(t)&&(e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.arcLengthDivisions=1},getBounds:function(t){return void 0===t&&(t=new o),r([this.p0,this.p1],t)},getStartPoint:function(t){return void 0===t&&(t=new a),t.copy(this.p0)},getResolution:function(t){return void 0===t&&(t=1),t},getPoint:function(t,e){return void 0===e&&(e=new a),1===t?e.copy(this.p1):(e.copy(this.p1).subtract(this.p0).scale(t).add(this.p0),e)},getPointAt:function(t,e){return this.getPoint(t,e)},getTangent:function(){return h.copy(this.p1).subtract(this.p0).normalize()},getUtoTmapping:function(t,e,i){var n;if(e){var s=this.getLengths(i),r=s[s.length-1];n=Math.min(e,r)/r}else n=t;return n},draw:function(t){return t.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});l.fromJSON=function(t){var e=t.points,i=new a(e[0],e[1]),n=new a(e[2],e[3]);return new l(i,n)},t.exports=l},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(81),r=i(326),o=i(3),a=new n({Extends:s,initialize:function(t,e,i){s.call(this,"QuadraticBezier"),Array.isArray(t)&&(i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,n=this.p1,s=this.p2;return e.set(r(t,i.x,n.x,s.x),r(t,i.y,n.y,s.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var n=1;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(171),s=i(0),r=i(81),o=i(3),a=new s({Extends:r,initialize:function(t){void 0===t&&(t=[]),r.call(this,"SplineCurve"),this.points=[],this.addPoints(t)},addPoints:function(t){for(var e=0;ei.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t,e,i,n){e&&""!==e||(e=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join("\n")),i&&""!==i||(i=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","void main () {","gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);","fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);","}"].join("\n")),void 0===n&&(n=null),this.key=t,this.fragmentSrc=e,this.vertexSrc=i,this.uniforms=n}});t.exports=n},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(31);n.ColorToRGBA=i(809),n.ComponentToHex=i(354),n.GetColor=i(165),n.GetColor32=i(295),n.HexStringToColor=i(294),n.HSLToColor=i(810),n.HSVColorWheel=i(811),n.HSVToRGB=i(166),n.HueToComponent=i(355),n.IntegerToColor=i(297),n.IntegerToRGB=i(298),n.Interpolate=i(812),n.ObjectToColor=i(299),n.RandomRGB=i(813),n.RGBStringToColor=i(300),n.RGBToHSV=i(296),n.RGBToString=i(814),n.ValueToColor=i(164),t.exports=n},function(t,e){t.exports=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e}},function(t,e){t.exports=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(117);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(177);t.exports=function(t,e){var i=window.screen,s=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);if(s&&"string"==typeof s.type)return s.type;if("string"==typeof s)return s;if(i)return i.height>i.width?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return n.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return n.ORIENTATION.LANDSCAPE}return e>t?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(t,e){t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(179),r=i(10),o=i(54),a=i(20),h=i(365),l=i(366),u=i(367),c=i(368),d=i(29),f=i(332),p=new n({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var n=new u(this,i);n.smoothFactor=e.inputSmoothFactor,this.pointers.push(n)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(o.MANAGER_BOOT),this.game.events.on(a.PRE_RENDER,this.preRender,this),this.game.events.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var n=0;n10&&(t=10-this.pointersTotal);for(var i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(123),s=i(0),r=i(20),o=i(54),a=i(124),h=i(0),l=new s({initialize:function(t){this.manager=t,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=h,this.onKeyUp=h,t.events.once(o.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.addCapture(t.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(r.POST_STEP,this.postUpdate,this)},startListeners:function(){var t=this;this.onKeyDown=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.useQueue||t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.useQueue||t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(169),r=i(54),o=i(0),a=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.capture=t.inputMouseCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},requestPointerLock:function(){if(s.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this,e=this.manager.canvas,i=window&&window.focus&&this.manager.game.config.autoFocus;this.onMouseMove=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseMove(e),t.capture&&e.preventDefault())},this.onMouseDown=function(n){i&&window.focus(),!n.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseDown(n),t.capture&&n.target===e&&n.preventDefault())},this.onMouseDownWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseDown(i)},this.onMouseUp=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseUp(i),t.capture&&i.target===e&&i.preventDefault())},this.onMouseUpWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseUp(i)},this.onMouseOver=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOver(e)},this.onMouseOut=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOut(e)},this.onMouseWheel=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.onMouseWheel(e)};var n=this.target;if(n){var r={passive:!0},o={passive:!1};n.addEventListener("mousemove",this.onMouseMove,this.capture?o:r),n.addEventListener("mousedown",this.onMouseDown,this.capture?o:r),n.addEventListener("mouseup",this.onMouseUp,this.capture?o:r),n.addEventListener("mouseover",this.onMouseOver,this.capture?o:r),n.addEventListener("mouseout",this.onMouseOut,this.capture?o:r),n.addEventListener("wheel",this.onMouseWheel,this.capture?o:r),window&&this.manager.game.config.inputWindowEvents&&(window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o)),s.pointerLock&&(this.pointerLockChange=function(e){var i=t.target;t.locked=document.pointerLockElement===i||document.mozPointerLockElement===i||document.webkitPointerLockElement===i,t.manager.onPointerLockChange(e)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&(window.removeEventListener("mousedown",this.onMouseDownWindow),window.removeEventListener("mouseup",this.onMouseUpWindow)),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(317),s=i(0),r=i(53),o=i(106),a=i(327),h=i(3),l=new s({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=this.x,i=this.y;1!==t.resolution&&(e+=t._x,i+=t._y);var n=t.getWorldPoint(e,i);return this.worldX=n.x,this.worldY=n.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,s=this.midPoint.y;if(t!==i||e!==s){var r=a(this.motionFactor,i,t),h=a(this.motionFactor,s,e);o(r,t,.1)&&(r=t),o(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=n(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=t.timeStamp),this.isDown=!1,this.wasTouch=!1},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=t.timeStamp),this.isDown=!0,this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,n=this.prevPosition.y,s=this.position.x,r=this.position.y,o=0;o * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(54),r=i(1),o=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=r,this.onTouchStartWindow=r,this.onTouchMove=r,this.onTouchEnd=r,this.onTouchEndWindow=r,this.onTouchCancel=r,this.onTouchCancelWindow=r,this.onTouchOver=r,this.onTouchOut=r,t.events.once(s.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target||(this.target=this.manager.game.canvas),t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},startListeners:function(){var t=this,e=this.manager.canvas,i=window&&window.focus&&this.manager.game.config.autoFocus;this.onTouchStart=function(n){i&&window.focus(),!n.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onTouchStart(n),t.capture&&n.cancelable&&n.target===e&&n.preventDefault())},this.onTouchStartWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onTouchStart(i)},this.onTouchMove=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onTouchMove(e),t.capture&&e.cancelable&&e.preventDefault())},this.onTouchEnd=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onTouchEnd(i),t.capture&&i.cancelable&&i.target===e&&i.preventDefault())},this.onTouchEndWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onTouchEnd(i)},this.onTouchCancel=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onTouchCancel(e),t.capture&&e.preventDefault())},this.onTouchCancelWindow=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.onTouchCancel(e)},this.onTouchOver=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOver(e)},this.onTouchOut=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOut(e)};var n=this.target;if(n){var s={passive:!0},r={passive:!1};n.addEventListener("touchstart",this.onTouchStart,this.capture?r:s),n.addEventListener("touchmove",this.onTouchMove,this.capture?r:s),n.addEventListener("touchend",this.onTouchEnd,this.capture?r:s),n.addEventListener("touchcancel",this.onTouchCancel,this.capture?r:s),n.addEventListener("touchover",this.onTouchOver,this.capture?r:s),n.addEventListener("touchout",this.onTouchOut,this.capture?r:s),window&&this.manager.game.config.inputWindowEvents&&(window.addEventListener("touchstart",this.onTouchStartWindow,r),window.addEventListener("touchend",this.onTouchEndWindow,r),window.addEventListener("touchcancel",this.onTouchCancelWindow,r)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.onTouchStart),t.removeEventListener("touchmove",this.onTouchMove),t.removeEventListener("touchend",this.onTouchEnd),t.removeEventListener("touchcancel",this.onTouchCancel),t.removeEventListener("touchover",this.onTouchOver),t.removeEventListener("touchout",this.onTouchOut),window&&(window.removeEventListener("touchstart",this.onTouchStartWindow),window.removeEventListener("touchend",this.onTouchEndWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=o},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(20),r=i(10),o=i(8),a=i(16),h=i(5),l=i(2),u=i(23),c=i(123),d=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once(s.BOOT,this.boot,this)},boot:function(){var t,e,i,n,r,o,a,h=this.game.config,u=h.installGlobalPlugins;for(u=u.concat(this._pendingGlobal),t=0;t * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(177),s=i(0),r=i(10),o=i(92),a=i(20),h=i(867),l=i(362),u=i(357),c=i(1),d=i(11),f=i(371),p=i(93),g=i(3),v=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.canvas,this.canvasBounds=new d,this.parent=null,this.parentIsWindow=!1,this.parentSize=new f,this.gameSize=new f,this.baseSize=new f,this.displaySize=new f,this.scaleMode=n.SCALE_MODE.NONE,this.resolution=1,this.zoom=1,this._resetZoom=!1,this.displayScale=new g(1,1),this.autoRound=!1,this.autoCenter=n.CENTER.NO_CENTER,this.orientation=n.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.listeners={orientationChange:c,windowResize:c,fullScreenChange:c,fullScreenError:c}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once("boot",this.boot,this)},boot:function(){var t=this.game;this.canvas=t.canvas,this.fullscreen=t.device.fullscreen,this.scaleMode!==n.SCALE_MODE.RESIZE&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===n.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),t.events.once(a.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,s=t.scaleMode,r=t.resolution,o=t.zoom,a=t.autoRound;if("string"==typeof e){var h=this.parentSize.width;0===h&&(h=window.innerWidth);var l=parseInt(e,10)/100;e=Math.floor(h*l)}if("string"==typeof i){var c=this.parentSize.height;0===c&&(c=window.innerHeight);var d=parseInt(i,10)/100;i=Math.floor(c*d)}this.resolution=1,this.scaleMode=s,this.autoRound=a,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,a&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),o===n.ZOOM.MAX_ZOOM&&(o=this.getMaxZoom()),this.zoom=o,1!==o&&(this._resetZoom=!0),this.baseSize.setSize(e*r,i*r),a&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*o,t.minHeight*o),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*o,t.maxHeight*o),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==n.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=this.resolution,n=e.width*i,s=e.height*i;return(t.width!==n||t.height!==s)&&(t.setSize(n,s),!0)},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e.call(screen,t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound,n=this.resolution;i&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,r=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(t/e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(s,r)},resize:function(t,e){var i=this.zoom,n=this.resolution,s=this.autoRound;s&&(t=Math.floor(t),e=Math.floor(e));var r=this.width,o=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),s&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i*n,e*i*n),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var a=this.canvas.style,h=t*i,l=e*i;return s&&(h=Math.floor(h),l=Math.floor(l)),h===t&&l===e||(a.width=h+"px",a.height=l+"px"),this.refresh(r,o)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var n=this.canvas.style,s=i.style;s.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",s.marginLeft=n.marginLeft,s.marginTop=n.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,this.resolution,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,s=this.gameSize.width,r=this.gameSize.height,o=this.zoom,a=this.autoRound;this.scaleMode===n.SCALE_MODE.NONE?(this.displaySize.setSize(s*o*1,r*o*1),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===n.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(1*this.displaySize.width,1*this.displaySize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=p(this.parentSize.width,this.gameSize.width,0,!0),e=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==n.CENTER.NO_CENTER){var e=this.canvas,i=e.style,s=e.getBoundingClientRect(),r=s.width,o=s.height,a=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-o)/2);t===n.CENTER.CENTER_HORIZONTALLY?h=0:t===n.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i,n=this.getFullscreenTarget();(i=e.keyboard?n[e.request](Element.ALLOW_KEYBOARD_INPUT):n[e.request](t))?i.then(this.fullscreenSuccessHandler.bind(this)).catch(this.fullscreenErrorHandler.bind(this)):e.active?this.fullscreenSuccessHandler():this.fullscreenErrorHandler()}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}return this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas)),this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.listeners;e.orientationChange=function(){t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available&&(e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)},["webkit","moz",""].forEach((function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)})),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1))},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.listeners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1),["webkit","moz",""].forEach((function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)})),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===n.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===n.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(19),s=i(0),r=i(93),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatio0&&(t=(e=r(e,n.y))*this.aspectRatio)):(i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,n.x>0&&(e=(t=r(t,n.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(125),r=i(22),o=i(20),a=i(6),h=i(82),l=i(1),u=i(373),c=i(180),d=new n({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,e){Array.isArray(e)||(e=[e]);for(var i=0;i-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;i.sceneUpdate=l,t.init&&(t.init.call(t,n.data),n.status=s.INIT,n.isTransition&&i.events.emit(r.TRANSITION_INIT,n.transitionFrom,n.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),0===e.list.size?this.create(t):(n.status=s.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(e)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var n=this.scenes[i].sys;n.settings.status>s.START&&n.settings.status<=s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=s.LOADING&&i.settings.status0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(180),r=new n({initialize:function(t){this.sys=new s(this,t),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins},update:function(){}});t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(125),s=i(6),r=i(126),o=i(880),a={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:s(t,"key",""),active:s(t,"active",!1),visible:s(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:s(t,"pack",!1),cameras:s(t,"cameras",null),map:s(t,"map",r(o,s(t,"mapAdd",{}))),physics:s(t,"physics",{}),loader:s(t,"loader",{}),plugins:s(t,"plugins",!1),input:s(t,"input",{})}}};t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(26),s=i(376),r=i(0),o=i(31),a=i(33),h=i(10),l=i(121),u=i(20),c=i(345),d=i(6),f=i(378),p=i(182),g=new r({Extends:h,initialize:function(t){h.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=n.create2D(this,1,1),this._tempContext=this._tempCanvas.getContext("2d"),this._pending=0,t.events.once(u.BOOT,this.boot,this)},boot:function(){this._pending=2,this.on(l.LOAD,this.updatePending,this),this.on(l.ERROR,this.updatePending,this),this.addBase64("__DEFAULT",this.game.config.defaultImage),this.addBase64("__MISSING",this.game.config.missingImage),this.game.events.once(u.DESTROY,this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off(l.LOAD),this.off(l.ERROR),this.emit(l.READY))},checkKey:function(t){return!this.exists(t)||(console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return console.warn("No texture found matching key: "+t),this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(t.destroy(),this.emit(l.REMOVE,t.key)),this},removeKey:function(t){return this.list.hasOwnProperty(t)&&delete this.list[t],this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,n=new Image;n.onerror=function(){i.emit(l.ERROR,t)},n.onload=function(){var e=i.create(t,n);f.Image(e,0),i.emit(l.ADD,t,e),i.emit(l.LOAD,t,e)},n.src=e}return this},getBase64:function(t,e,i,s){void 0===i&&(i="image/png"),void 0===s&&(s=.92);var r="",o=this.getFrame(t,e);if(o&&(o.source.isRenderTexture||o.source.isGLTexture))console.warn("Cannot getBase64 from WebGL Texture");else if(o){var a=o.canvasData,h=n.create2D(this,a.width,a.height);h.getContext("2d").drawImage(o.source.image,a.x,a.y,a.width,a.height,0,0,a.width,a.height),r=h.toDataURL(i,s),n.remove(h)}return r},addImage:function(t,e,i){var n=null;return this.checkKey(t)&&(n=this.create(t,e),f.Image(n,0),i&&n.setDataSource(i),this.emit(l.ADD,t,n)),n},addGLTexture:function(t,e,i,n){var s=null;return this.checkKey(t)&&((s=this.create(t,e,i,n)).add("__BASE",0,0,0,i,n),this.emit(l.ADD,t,s)),s},addRenderTexture:function(t,e){var i=null;return this.checkKey(t)&&((i=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),this.emit(l.ADD,t,i)),i},generate:function(t,e){if(this.checkKey(t)){var i=n.create(this,1,1);return e.canvas=i,c(e),this.addCanvas(t,i)}return null},createCanvas:function(t,e,i){if(void 0===e&&(e=256),void 0===i&&(i=256),this.checkKey(t)){var s=n.create(this,e,i,a.CANVAS,!0);return this.addCanvas(t,s)}return null},addCanvas:function(t,e,i){void 0===i&&(i=!1);var n=null;return i?n=new s(this,t,e,e.width,e.height):this.checkKey(t)&&(n=new s(this,t,e,e.width,e.height),this.list[t]=n,this.emit(l.ADD,t,n)),n},addAtlas:function(t,e,i,n){return Array.isArray(i.textures)||Array.isArray(i.frames)?this.addAtlasJSONArray(t,e,i,n):this.addAtlasJSONHash(t,e,i,n)},addAtlasJSONArray:function(t,e,i,n){var s=null;if(this.checkKey(t)){if(s=this.create(t,e),Array.isArray(i))for(var r=1===i.length,o=0;o=r.x&&t=r.y&&e=r.x&&t=r.y&&e * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(19),r=i(31),o=i(33),a=i(120),h=i(182),l=new n({Extends:h,initialize:function(t,e,i,n,s){h.call(this,t,e,i,n,s),this.add("__BASE",0,0,0,n,s),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d"),this.width=n,this.height=s,this.imageData=this.context.getImageData(0,0,n,s),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===o.WEBGL&&this.refresh(),this},draw:function(t,e,i){return this.context.drawImage(i,t,e),this.update()},drawFrame:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var s=this.manager.getFrame(t,e);if(s){var r=s.canvasData,o=s.cutWidth,a=s.cutHeight,h=s.source.resolution;return this.context.drawImage(s.source.image,r.x,r.y,o,a,i,n,o/h,a/h),this.update()}return this},setPixel:function(t,e,i,n,s,r){if(void 0===r&&(r=255),t=Math.abs(Math.floor(t)),e=Math.abs(Math.floor(e)),this.getIndex(t,e)>-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=n,o.data[2]=s,o.data[3]=r,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i,n,s,r,o){return void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,n,s,r,o),this},getData:function(t,e,i,n){return t=s(Math.floor(t),0,this.width-1),e=s(Math.floor(e),0,this.height-1),i=s(i,1,this.width-t),n=s(n,1,this.height-e),this.context.getImageData(t,e,i,n)},getPixel:function(t,e,i){i||(i=new r);var n=this.getIndex(t,e);if(n>-1){var s=this.data,o=s[n+0],a=s[n+1],h=s[n+2],l=s[n+3];i.setTo(o,a,h,l)}return i},getPixels:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=s(t,0,this.width),a=s(t+i,0,this.width),h=s(e,0,this.height),l=s(e+n,0,this.height),u=new r,c=[],d=h;d * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(26),s=i(0),r=i(120),o=i(234),a=new s({initialize:function(t,e,i,n,s){void 0===s&&(s=!1);var a=t.manager.game;this.renderer=a.renderer,this.texture=t,this.source=e,this.image=e,this.compressionAlgorithm=null,this.resolution=1,this.width=i||e.naturalWidth||e.videoWidth||e.width||0,this.height=n||e.naturalHeight||e.videoHeight||e.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&e instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===e.type,this.isGLTexture=window.hasOwnProperty("WebGLTexture")&&e instanceof WebGLTexture,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.flipY=s,this.init(a)},init:function(t){this.renderer&&(this.renderer.gl?this.isCanvas?this.glTexture=this.renderer.createCanvasTexture(this.image,!1,this.flipY):this.isVideo?this.glTexture=this.renderer.createVideoTexture(this.image,!1,this.flipY):this.isRenderTexture?(this.image=this.source.canvas,this.glTexture=this.renderer.createTextureFromSource(null,this.width,this.height,this.scaleMode)):this.isGLTexture?this.glTexture=this.source:this.glTexture=this.renderer.createTextureFromSource(this.image,this.width,this.height,this.scaleMode):this.isRenderTexture&&(this.image=this.source.canvas)),t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t),this.scaleMode=t},setFlipY:function(t){return void 0===t&&(t=!0),this.flipY=t,this},update:function(){var t=this.renderer.gl;t&&this.isCanvas?this.glTexture=this.renderer.updateCanvasTexture(this.image,this.glTexture,this.flipY):t&&this.isVideo&&(this.glTexture=this.renderer.updateVideoTexture(this.image,this.glTexture,this.flipY))},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&n.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={AtlasXML:i(881),Canvas:i(882),Image:i(883),JSONArray:i(884),JSONHash:i(885),SpriteSheet:i(886),SpriteSheetFromAtlas:i(887),UnityYAML:i(888)}},function(t,e,i){ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(380),s=i(384),r=i(386),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e&&e.noAudio||!i.webAudio&&!i.audioData?new s(t):!i.webAudio||e&&e.disableWebAudio?new n(t):new r(t)}};t.exports=o},function(t,e,i){ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(127),s=i(0),r=i(59),o=i(383),a=new s({Extends:n,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,n.call(this,t)},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each((function(e,i){for(var n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(68);t.exports=function(t,e,i,s,r){void 0===s&&(s=0),void 0===r&&(r=t.length);var o=[];if(n(t,s,r))for(var a=s;a * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r))for(var o=s;o * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(128),s=i(0),r=i(59),o=i(19),a=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.tags=t.game.cache.audio.get(e),!this.tags)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,n.call(this,t,e,i)},play:function(t,e){return!(this.manager.isLocked(this,"play",[t,e])||!n.prototype.play.call(this,t,e)||!this.pickAndPlayAudioTag()||(this.emit(r.PLAY,this),0))},pause:function(){return!(this.manager.isLocked(this,"pause")||this.startTime>0||!n.prototype.pause.call(this)||(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),0))},resume:function(){return!(this.manager.isLocked(this,"resume")||this.startTime>0||!n.prototype.resume.call(this)||!this.pickAndPlayAudioTag()||(this.emit(r.RESUME,this),0))},stop:function(){return!this.manager.isLocked(this,"stop")&&!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=s}},destroy:function(){n.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=o(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){n.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(r.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(r.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,r.RATE,t)||(this.calculateRate(),this.emit(r.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,r.DETUNE,t)||(this.calculateRate(),this.emit(r.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this}});t.exports=a},function(t,e,i){ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(127),s=i(0),r=i(10),o=i(385),a=i(1),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}});t.exports=h},function(t,e,i){ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(128),s=i(0),r=i(10),o=i(18),a=function(){return!1},h=function(){return this},l=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:a,updateMarker:a,removeMarker:function(){return null},play:a,pause:a,resume:a,stop:a,destroy:function(){n.prototype.destroy.call(this)},setMute:h,setVolume:h,setRate:h,setDetune:h,setSeek:h,setLoop:h});t.exports=l},function(t,e,i){ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(387),s=i(127),r=i(0),o=i(59),a=i(388),h=new r({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),s.call(this,t),this.locked&&this.unlock()},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new a(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var s=this.game.cache.audio,r=i.length,a=0;a * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),s=0;s>4,u[h++]=(15&i)<<4|s>>2,u[h++]=(3&s)<<6|63&r;return l}},function(t,e,i){ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(128),s=i(0),r=i(59),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime-1;r--)n[s][r]=t[r][s]}return n}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ function i(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function n(t,e){return te?1:0}var s=function(t,e,r,o,a){for(void 0===r&&(r=0),void 0===o&&(o=t.length-1),void 0===a&&(a=n);o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));s(t,e,f,p,a)}var g=t[e],v=r,m=o;for(i(t,r,e),a(t[o],g)>0&&i(t,r,o);v0;)m--}0===a(t[r],g)?i(t,r,m):i(t,++m,o),m<=e&&(r=m+1),e<=m&&(o=m-1)}};t.exports=s},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(6),s=i(114),r=function(t,e,i){for(var n=[],s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(14);t.exports=function(t,e){var i=n(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var s=t.anims,r=n(i,"key",void 0),o=n(i,"startFrame",void 0),a=n(i,"delay",0),h=n(i,"repeat",0),l=n(i,"repeatDelay",0),u=n(i,"yoyo",!1),c=n(i,"play",!1),d=n(i,"delayedPlay",0);s.setDelay(a),s.setRepeat(h),s.setRepeatDelay(l),s.setYoyo(u),c?s.play(r,o):d>0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(11);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-s,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,o,a)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(12),r=i(955),o=i(13),a=i(7),h=i(178),l=i(22),u=i(333),c=new n({Extends:o,Mixins:[s.AlphaSingle,s.BlendMode,s.Depth,s.Origin,s.ScrollFactor,s.Transform,s.Visible,r],initialize:function(t,e,i,n,s,r){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new u,this.rotate3dAngle="deg",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof n?"#"===n[0]?this.setElement(n.substr(1),s,r):this.createElement(n,s,r):n&&this.setElement(n,s,r),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this)},handleSceneEvent:function(t){var e=this.node,i=e.style;e&&(i.display=t.settings.visible?"block":"none")},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(956),s=i(13);t.exports=function(t,e,i,r,o){var a=e.node,h=a.style,l=e.scene.sys.settings;if(!(a&&h&&l.visible&&s.RENDER_MASK===e.renderFlags)||0!==e.cameraFilter&&e.cameraFilter&r.id||e.parentContainer&&!e.parentContainer.willRender())a&&(h.display="none");else{var u=e.parentContainer,c=r.alpha*e.alpha;u&&(c*=u.alpha);var d=t._tempMatrix1,f=t._tempMatrix2,p=t._tempMatrix3,g=0,v=0,m="0%",y="0%";o?(g=e.width*e.scaleX*e.originX,v=e.height*e.scaleY*e.originY,f.applyITRS(e.x-g,e.y-v,e.rotation,e.scaleX,e.scaleY),d.copyFrom(r.matrix),d.multiplyWithOffset(o,-r.scrollX*e.scrollFactorX,-r.scrollY*e.scrollFactorY),f.e=e.x-g,f.f=e.y-v,d.multiply(f,p)):(g=e.width*e.originX,v=e.height*e.originY,f.applyITRS(e.x-g,e.y-v,e.rotation,e.scaleX,e.scaleY),d.copyFrom(r.matrix),m=100*e.originX+"%",y=100*e.originY+"%",f.e-=r.scrollX*e.scrollFactorX,f.f-=r.scrollY*e.scrollFactorY,d.multiply(f,p)),e.transformOnly||(h.display="block",h.opacity=c,h.zIndex=e._depth,h.pointerEvents="auto",h.mixBlendMode=n[e._blendMode]),h.transform=p.getCSSMatrix()+" skew("+e.skewX+"rad, "+e.skewY+"rad) rotate3d("+e.rotate3d.x+","+e.rotate3d.y+","+e.rotate3d.z+","+e.rotate3d.w+e.rotate3dAngle+")",h.transformOrigin=m+" "+y}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(12),r=i(13),o=i(960),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.Origin,s.ScrollFactor,s.Size,s.Texture,s.Tint,s.Transform,s.Visible,o],initialize:function(t){r.call(this,t,"Extern")},preUpdate:function(){},render:function(){}});t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(193),s=i(87),r=i(15),o=i(4);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(399),s=i(193),r=i(87),o=i(15);t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(e=n(t)/i);for(var h=0;h * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(192),s=i(28);t.exports=function(t,e,i,r,o,a,h){var l=e.commandBuffer,u=l.length,c=a||t.currentContext;if(0!==u&&s(t,c,e,r,o)){var d=1,f=1,p=0,g=0,v=1,m=0,y=0,x=0;c.beginPath();for(var T=0;T>>16,y=(65280&p)>>>8,x=255&p,c.strokeStyle="rgba("+m+","+y+","+x+","+d+")",c.lineWidth=v,T+=3;break;case n.FILL_STYLE:g=l[T+1],f=l[T+2],m=(16711680&g)>>>16,y=(65280&g)>>>8,x=255&g,c.fillStyle="rgba("+m+","+y+","+x+","+f+")",T+=2;break;case n.BEGIN_PATH:c.beginPath();break;case n.CLOSE_PATH:c.closePath();break;case n.FILL_PATH:h||c.fill();break;case n.STROKE_PATH:h||c.stroke();break;case n.FILL_RECT:h?c.rect(l[T+1],l[T+2],l[T+3],l[T+4]):c.fillRect(l[T+1],l[T+2],l[T+3],l[T+4]),T+=4;break;case n.FILL_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.fill(),T+=6;break;case n.STROKE_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.stroke(),T+=6;break;case n.LINE_TO:c.lineTo(l[T+1],l[T+2]),T+=2;break;case n.MOVE_TO:c.moveTo(l[T+1],l[T+2]),T+=2;break;case n.LINE_FX_TO:c.lineTo(l[T+1],l[T+2]),T+=5;break;case n.MOVE_FX_TO:c.moveTo(l[T+1],l[T+2]),T+=5;break;case n.SAVE:c.save();break;case n.RESTORE:c.restore();break;case n.TRANSLATE:c.translate(l[T+1],l[T+2]),T+=2;break;case n.SCALE:c.scale(l[T+1],l[T+2]),T+=2;break;case n.ROTATE:c.rotate(l[T+1]),T+=1;break;case n.GRADIENT_FILL_STYLE:T+=5;break;case n.GRADIENT_LINE_STYLE:T+=6;break;case n.SET_TEXTURE:T+=2}c.restore()}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(2),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(35),r=i(53),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(52),s=i(0),r=i(12),o=i(404),a=i(405),h=i(972),l=i(2),u=i(185),c=i(406),d=i(108),f=i(402),p=i(407),g=i(11),v=i(131),m=i(3),y=i(58),x=new s({Mixins:[r.BlendMode,r.Mask,r.ScrollFactor,r.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=f,this.x=new h(e,"x",0,!0),this.y=new h(e,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",0,!0),this.moveToY=new h(e,"moveToY",0,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",4294967295),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3,!0),this.angle=new h(e,"angle",{min:0,max:360},!0),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=n.NORMAL,this.follow=null,this.followOffset=new m,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(!t)return this;var e=0,i="";for(e=0;e0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0){var u=this.deathCallback,c=this.deathCallbackScope;for(o=h-1;o>=0;o--){var d=a[o];s.splice(d.index,1),r.push(d.particle),u&&u.call(c,d.particle),d.particle.resetPosition()}}this.on&&(0===this.frequency?this.emitParticle():this.frequency>0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=x},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e){t.exports=function(t,e){for(var i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(3),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(12),r=i(75),o=new n({Extends:r,Mixins:[s.PathFollower],initialize:function(t,e,i,n,s,o){r.call(this,t,i,n,s,o),this.path=e},preUpdate:function(t,e){this.anims.update(t,e),this.pathUpdate(t)}});t.exports=o},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(998),s=i(0),r=i(35),o=i(66),a=i(65),h=i(15),l=i(30),u=new s({Extends:l,Mixins:[n],initialize:function(t,e,i,n,s,r,o,h,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===s&&(s=0),void 0===r&&(r=360),void 0===o&&(o=!1),l.call(this,t,"Arc",new a(0,0,n)),this._startAngle=s,this._endAngle=r,this._anticlockwise=o,this._iterations=.01,this.setPosition(e,i);var c=2*this.geom.radius;this.setSize(c,c),void 0!==h&&this.setFillStyle(h,u),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(t){this._iterations=t,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(t){this.geom.radius=t;var e=2*t;this.setSize(e,e),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(t){this._startAngle=t,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(t){this._endAngle=t,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(t){this._anticlockwise=t,this.updateData()}},setRadius:function(t){return this.radius=t,this},setIterations:function(t){return void 0===t&&(t=.01),this.iterations=t,this},setStartAngle:function(t,e){return this._startAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},setEndAngle:function(t,e){return this._endAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},updateData:function(){var t=this._iterations,e=t,i=this.geom.radius,n=r(this._startAngle),s=r(this._endAngle),a=i,l=i;s-=n,this._anticlockwise?s<-h.PI2?s=-h.PI2:s>0&&(s=-h.PI2+s%h.PI2):s>h.PI2?s=h.PI2:s<0&&(s=h.PI2+s%h.PI2);for(var u,c=[a+Math.cos(n)*i,l+Math.sin(n)*i];e<1;)u=s*e+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=s+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),c.push(a+Math.cos(n)*i,l+Math.sin(n)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=u},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(1001),r=i(66),o=i(11),a=i(30),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(66),r=i(1004),o=i(95),a=i(30),h=new n({Extends:a,Mixins:[r],initialize:function(t,e,i,n,s,r,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===s&&(s=128),a.call(this,t,"Ellipse",new o(n/2,s/2,n,s)),this._smoothness=64,this.setPosition(e,i),this.width=n,this.height=s,void 0!==r&&this.setFillStyle(r,h),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSize:function(t,e){return this.geom.setSize(t,e),this.updateData()},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){for(var t=[],e=this.geom.getPoints(this._smoothness),i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(30),r=i(1007),o=new n({Extends:s,Mixins:[r],initialize:function(t,e,i,n,r,o,a,h,l,u,c){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===r&&(r=128),void 0===o&&(o=32),void 0===a&&(a=32),s.call(this,t,"Grid",null),this.cellWidth=o,this.cellHeight=a,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(e,i),this.setSize(n,r),void 0!==h&&this.setFillStyle(h,l),void 0!==u&&this.setOutlineStyle(u,c),this.updateDisplayOrigin()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showCells=!1:(this.fillColor=t,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showAltCells=!1:(this.altFillColor=t,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showOutline=!1:(this.outlineFillColor=t,this.outlineFillAlpha=e,this.showOutline=!0),this}});t.exports=o},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1010),s=i(0),r=i(30),o=new s({Extends:r,Mixins:[n],initialize:function(t,e,i,n,s,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=48),void 0===s&&(s=32),void 0===o&&(o=15658734),void 0===a&&(a=10066329),void 0===h&&(h=13421772),r.call(this,t,"IsoBox",null),this.projection=4,this.fillTop=o,this.fillLeft=a,this.fillRight=h,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(e,i),this.setSize(n,s),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=o},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(1013),r=i(30),o=new n({Extends:r,Mixins:[s],initialize:function(t,e,i,n,s,o,a,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=48),void 0===s&&(s=32),void 0===o&&(o=!1),void 0===a&&(a=15658734),void 0===h&&(h=10066329),void 0===l&&(l=13421772),r.call(this,t,"IsoTriangle",null),this.projection=4,this.fillTop=a,this.fillLeft=h,this.fillRight=l,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=o,this.isFilled=!0,this.setPosition(e,i),this.setSize(n,s),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setReversed:function(t){return this.isReversed=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=o},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(30),r=i(56),o=i(1016),a=new n({Extends:s,Mixins:[o],initialize:function(t,e,i,n,o,a,h,l,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=0),void 0===a&&(a=128),void 0===h&&(h=0),s.call(this,t,"Line",new r(n,o,a,h));var c=this.geom.right-this.geom.left,d=this.geom.bottom-this.geom.top;this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(e,i),this.setSize(c,d),void 0!==l&&this.setStrokeStyle(1,l,u),this.updateDisplayOrigin()},setLineWidth:function(t,e){return void 0===e&&(e=t),this._startWidth=t,this._endWidth=e,this.lineWidth=t,this},setTo:function(t,e,i,n){return this.geom.setTo(t,e,i,n),this}});t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1019),s=i(0),r=i(66),o=i(417),a=i(201),h=i(30),l=i(420),u=new s({Extends:h,Mixins:[n],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Polygon",new a(n));var l=o(this.geom);this.setPosition(e,i),this.setSize(l.width,l.height),void 0!==s&&this.setFillStyle(s,r),this.updateDisplayOrigin(),this.updateData()},smooth:function(t){void 0===t&&(t=1);for(var e=0;e * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(11);t.exports=function(t,e){void 0===e&&(e=new n);for(var i,s=1/0,r=1/0,o=-s,a=-r,h=0;h * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(57),s=i(56),r=i(419);t.exports=function(t,e,i,o){void 0===o&&(o=[]);var a=t.points,h=r(t);!e&&i>0&&(e=h/i);for(var l=0;lc+v)){var m=g.getPoint((u-c)/v);o.push(m);break}c+=v}return o}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(57),s=i(56);t.exports=function(t){for(var e=t.points,i=0,r=0;r * @author Igor Ognichenko * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i=function(t,e){return t[0]=e[0],t[1]=e[1],t};t.exports=function(t){var e,n=[],s=t.points;for(e=0;e0&&r.push(i([0,0],n[0])),e=0;e1&&r.push(i([0,0],n[n.length-1])),t.setTo(r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(11),r=i(30),o=i(1022),a=new n({Extends:r,Mixins:[o],initialize:function(t,e,i,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===o&&(o=128),r.call(this,t,"Rectangle",new s(0,0,n,o)),this.setPosition(e,i),this.setSize(n,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1025),s=i(0),r=i(66),o=i(30),a=new s({Extends:o,Mixins:[n],initialize:function(t,e,i,n,s,r,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=5),void 0===s&&(s=32),void 0===r&&(r=64),o.call(this,t,"Star",null),this._points=n,this._innerRadius=s,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,n=this._outerRadius,s=Math.PI/2*3,o=Math.PI/e,a=n,h=n;t.push(a,h+-n);for(var l=0;l * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(30),r=i(71),o=i(1028),a=new n({Extends:s,Mixins:[o],initialize:function(t,e,i,n,o,a,h,l,u,c,d){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=128),void 0===a&&(a=64),void 0===h&&(h=0),void 0===l&&(l=128),void 0===u&&(u=128),s.call(this,t,"Triangle",new r(n,o,a,h,l,u));var f=this.geom.right-this.geom.left,p=this.geom.bottom-this.geom.top;this.setPosition(e,i),this.setSize(f,p),void 0!==c&&this.setFillStyle(c,d),this.updateDisplayOrigin(),this.updateData()},setTo:function(t,e,i,n,s,r){return this.geom.setTo(t,e,i,n,s,r),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4),s=i(57);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();if(e<=0||e>=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(57),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;!e&&i>0&&(e=d/i);for(var f=0;fl+u?(g=(p-=l+u)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=l)/u,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e){t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=t,o=0;o * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(9),r=new n({initialize:function(t,e,i,n,s,r,o){this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1},set:function(t,e,i,n,s,r,o){return this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1,this},setScrollFactor:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this},setColor:function(t){var e=s.getFloatsFromUintRGB(t);return this.r=e[0],this.g=e[1],this.b=e[2],this},setIntensity:function(t){return this.intensity=t,this},setPosition:function(t,e){return this.x=t,this.y=e,this},setRadius:function(t){return this.radius=t,this}});t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(427),r=i(9),o=new n({initialize:function(){this.lightPool=[],this.lights=[],this.culledLights=[],this.ambientColor={r:.1,g:.1,b:.1},this.active=!1,this.maxLights=-1},enable:function(){return-1===this.maxLights&&(this.maxLights=this.scene.sys.game.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},cull:function(t){var e=this.lights,i=this.culledLights,n=e.length,s=t.x+t.width/2,r=t.y+t.height/2,o=(t.width+t.height)/2,a={x:0,y:0},h=t.matrix,l=this.systems.game.config.height;i.length=0;for(var u=0;u0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],o):h=new s(t,e,i,a[0],a[1],a[2],o),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=o},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(47),s=i(18),r={Circle:i(1088),Ellipse:i(1098),Intersects:i(430),Line:i(1117),Point:i(1139),Polygon:i(1153),Rectangle:i(443),Triangle:i(1184)};r=s(!1,r,n),t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={CircleToCircle:i(205),CircleToRectangle:i(206),GetCircleToCircle:i(1108),GetCircleToRectangle:i(1109),GetLineToCircle:i(207),GetLineToRectangle:i(209),GetRectangleIntersection:i(1110),GetRectangleToRectangle:i(1111),GetRectangleToTriangle:i(1112),GetTriangleToCircle:i(1113),GetTriangleToLine:i(435),GetTriangleToTriangle:i(1114),LineToCircle:i(208),LineToLine:i(84),LineToRectangle:i(431),PointToLine:i(439),PointToLineSegment:i(1115),RectangleToRectangle:i(135),RectangleToTriangle:i(432),RectangleToValues:i(1116),TriangleToCircle:i(434),TriangleToLine:i(436),TriangleToTriangle:i(437)}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(84),s=i(48),r=i(210),o=i(433);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(208),s=i(83);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottom * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(83),s=i(84);t.exports=function(t,e){return!!(n(t,e.getPointA())||n(t,e.getPointB())||s(t.getLineA(),e)||s(t.getLineB(),e)||s(t.getLineC(),e))}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(210),s=i(438),r=i(84);t.exports=function(t,e){if(t.left>e.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=1);var n=e.x1,s=e.y1,r=e.x2,o=e.y2,a=t.x,h=t.y,l=(r-n)*(r-n)+(o-s)*(o-s);if(0===l)return!1;var u=((a-n)*(r-n)+(h-s)*(o-s))/l;if(u<0)return Math.sqrt((n-a)*(n-a)+(s-h)*(s-h))<=i;if(u>=0&&u<=1){var c=((s-h)*(r-n)-(n-a)*(o-s))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-a)*(r-a)+(o-h)*(o-h))<=i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(15),s=i(58),r=i(85);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(11);n.Area=i(1158),n.Ceil=i(1159),n.CeilAll=i(1160),n.CenterOn=i(168),n.Clone=i(1161),n.Contains=i(48),n.ContainsPoint=i(1162),n.ContainsRect=i(444),n.CopyFrom=i(1163),n.Decompose=i(433),n.Equals=i(1164),n.FitInside=i(1165),n.FitOutside=i(1166),n.Floor=i(1167),n.FloorAll=i(1168),n.FromPoints=i(176),n.FromXY=i(1169),n.GetAspectRatio=i(212),n.GetCenter=i(1170),n.GetPoint=i(152),n.GetPoints=i(274),n.GetSize=i(1171),n.Inflate=i(1172),n.Intersection=i(1173),n.MarchingAnts=i(285),n.MergePoints=i(1174),n.MergeRect=i(1175),n.MergeXY=i(1176),n.Offset=i(1177),n.OffsetPoint=i(1178),n.Overlaps=i(1179),n.Perimeter=i(112),n.PerimeterPoint=i(1180),n.Random=i(155),n.RandomOutside=i(1181),n.SameDimensions=i(1182),n.Scale=i(1183),n.Union=i(393),t.exports=n},function(t,e){t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,l=t.y3,u=s(h,l,o,a),c=s(i,r,h,l),d=s(o,a,i,r),f=u+c+d;return e.x=(i*u+o*c+h*d)/f,e.y=(r*u+a*c+l*d)/f,e}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,alwaysEnabled:!1,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(214),r=new n({initialize:function(t,e){this.pad=t,this.events=t.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(t){this.value=t;var e=this.pad,i=this.index;t>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(449),s=i(450),r=i(0),o=i(10),a=i(3),h=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),s>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(10),r=i(137),o=new n({Extends:s,initialize:function(t,e){s.call(this),this.plugin=t,this.keyCode=e,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(t){return this.emitOnRepeat=t,this},onDown:function(t){this.originalEvent=t,this.enabled&&(this.altKey=t.altKey,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.location=t.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(r.DOWN,this,t):(this.isDown=!0,this.isUp=!1,this.timeDown=t.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(r.DOWN,this,t)))},onUp:function(t){this.originalEvent=t,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=t.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(r.UP,this,t))},reset:function(){return this.preventDefault=!0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});t.exports=o},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(137),r=i(2),o=i(1223),a=i(1225),h=new n({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(215);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;if(s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.headers)for(var r in i.headers)s.setRequestHeader(r,i.headers[r]);return i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.requestedWith&&s.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),i.withCredentials&&(s.withCredentials=!0),s.onload=t.onLoad.bind(t,s),s.onerror=t.onError.bind(t,s),s.onprogress=t.onProgress.bind(t),s.send(),s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(21),o=i(8),a=i(2),h=i(456),l=i(7),u=new n({Extends:r,initialize:function(t,e,i,n,s){if(l(e)){var o=e;e=a(o,"key"),n=a(o,"xhrSettings"),s=a(o,"context",s)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:n,config:{context:s}};r.call(this,t,h)},onProcess:function(){this.state=s.FILE_PROCESSING;var t=this;this.config.context.decodeAudioData(this.xhrLoader.response,(function(e){t.data=e,t.onProcessComplete()}),(function(e){console.error("Error decoding audio: "+this.key+" - ",e?e.message:null),t.onProcessError()})),this.config.context=null}});u.create=function(t,e,i,n,s){var r=t.systems.game,o=r.config.audio,c=r.device.audio;l(e)&&(i=a(e,"url",[]),n=a(e,"config",{}));var d=u.getAudioURL(r,i);return d?!c.webAudio||o&&o.disableWebAudio?new h(t,e,d,n):new u(t,e,d,s,r.sound.context):null},u.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(82),r=i(21),o=i(2),a=i(138),h=i(7),l=new n({Extends:r,initialize:function(t,e,i,n){if(h(e)){var s=e;e=o(s,"key"),n=o(s,"config",n)}var a={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:n};r.call(this,t,a),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(21),o=i(8),a=i(2),h=i(7),l=new n({Extends:r,initialize:function(t,e,i,n){var s="js";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"script",cache:!1,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("script",(function(t,e,i){if(Array.isArray(t))for(var n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(21),o=i(8),a=i(2),h=i(7),l=new n({Extends:r,initialize:function(t,e,i,n){var s="txt";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"text",cache:t.cacheManager.text,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("text",(function(t,e,i){if(Array.isArray(t))for(var n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(460),s=i(140),r=i(0),o=i(50),a=i(461),h=i(462),l=new r({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,s){return this.world.addCollider(t,e,i,n,s)},overlap:function(t,e,i,n,s){return this.world.addOverlap(t,e,i,n,s)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},image:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticSprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},sprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new a(this.world,this.world.scene,t,e))},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=l},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(217),r=i(107),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(140),s=i(0),r=i(50),o=i(2),a=i(97),h=i(7),l=new s({Extends:a,initialize:function(t,e,i,s){if(i||s)if(h(i))s=i,i=null,s.internalCreateCallback=this.createCallbackHandler,s.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(i)&&h(i[0])){s=i[0];var l=this;i.forEach((function(t){t.internalCreateCallback=l.createCallbackHandler,t.internalRemoveCallback=l.removeCallbackHandler}))}else s={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else s={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=t,s.classType=o(s,"classType",n),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(s,"collideWorldBounds",!1),setBoundsRectangle:o(s,"customBoundsRectangle",null),setAccelerationX:o(s,"accelerationX",0),setAccelerationY:o(s,"accelerationY",0),setAllowDrag:o(s,"allowDrag",!0),setAllowGravity:o(s,"allowGravity",!0),setAllowRotation:o(s,"allowRotation",!0),setBounceX:o(s,"bounceX",0),setBounceY:o(s,"bounceY",0),setDragX:o(s,"dragX",0),setDragY:o(s,"dragY",0),setEnable:o(s,"enable",!0),setGravityX:o(s,"gravityX",0),setGravityY:o(s,"gravityY",0),setFrictionX:o(s,"frictionX",0),setFrictionY:o(s,"frictionY",0),setVelocityX:o(s,"velocityX",0),setVelocityY:o(s,"velocityY",0),setAngularVelocity:o(s,"angularVelocity",0),setAngularAcceleration:o(s,"angularAcceleration",0),setAngularDrag:o(s,"angularDrag",0),setMass:o(s,"mass",1),setImmovable:o(s,"immovable",!1)},Array.isArray(i)&&(s=null),a.call(this,e,i,s),this.type="PhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(140),s=i(0),r=i(50),o=i(2),a=i(97),h=i(7),l=new s({Extends:a,initialize:function(t,e,i,s){i||s?h(i)?(s=i,i=null,s.internalCreateCallback=this.createCallbackHandler,s.internalRemoveCallback=this.removeCallbackHandler,s.createMultipleCallback=this.createMultipleCallbackHandler,s.classType=o(s,"classType",n)):Array.isArray(i)&&h(i[0])&&(s=i,i=null,s.forEach((function(t){t.internalCreateCallback=this.createCallbackHandler,t.internalRemoveCallback=this.removeCallbackHandler,t.createMultipleCallback=this.createMultipleCallbackHandler,t.classType=o(t,"classType",n)}))):s={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:n},this.world=t,this.physicsType=r.STATIC_BODY,a.call(this,e,i,s),this.type="StaticPhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,r.STATIC_BODY)},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var t=this.children.entries,e=0;e * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(465),s=i(19),r=i(0),o=i(466),a=i(50),h=i(53),l=i(10),u=i(218),c=i(106),d=i(321),f=i(322),p=i(467),g=i(468),v=i(6),m=i(186),y=i(1282),x=i(11),T=i(469),w=i(1283),b=i(1288),E=i(1289),S=i(133),_=i(471),A=i(470),C=i(29),M=i(3),P=i(58),O=new r({Extends:l,initialize:function(t,e){l.call(this),this.scene=t,this.bodies=new S,this.staticBodies=new S,this.pendingDestroy=new S,this.colliders=new m,this.gravity=new M(v(e,"gravity.x",0),v(e,"gravity.y",0)),this.bounds=new x(v(e,"x",0),v(e,"y",0),v(e,"width",t.sys.scale.width),v(e,"height",t.sys.scale.height)),this.checkCollision={up:v(e,"checkCollision.up",!0),down:v(e,"checkCollision.down",!0),left:v(e,"checkCollision.left",!0),right:v(e,"checkCollision.right",!0)},this.fps=v(e,"fps",60),this.fixedStep=!0,this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=v(e,"timeScale",1),this.OVERLAP_BIAS=v(e,"overlapBias",4),this.TILE_BIAS=v(e,"tileBias",16),this.forceX=v(e,"forceX",!1),this.isPaused=v(e,"isPaused",!1),this._total=0,this.drawDebug=v(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:v(e,"debugShowBody",!0),debugShowStaticBody:v(e,"debugShowStaticBody",!0),debugShowVelocity:v(e,"debugShowVelocity",!0),bodyDebugColor:v(e,"debugBodyColor",16711935),staticBodyDebugColor:v(e,"debugStaticBodyColor",255),velocityDebugColor:v(e,"debugVelocityColor",65280)},this.maxEntries=v(e,"maxEntries",16),this.useTree=v(e,"useTree",!0),this.tree=new T(this.maxEntries),this.staticTree=new T(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new C,this._tempMatrix2=new C,this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=a.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i=r;for(this.fixedStep||(s=.001*e,a=!0,this._elapsed=0),i=0;i=r;)this._elapsed-=r,this.step(s)}},step:function(t){var e,i,n=this.bodies.entries,s=n.length;for(e=0;e0){var l=this.tree,u=this.staticTree;for(n=(i=h.entries).length,t=0;t-1&&p>g&&(t.velocity.normalize().scale(g),p=g),t.speed=p},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,c=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)r.right&&(s=h(o.x,o.y,r.right,r.y)-o.radius):o.y>r.bottom&&(o.xr.right&&(s=h(o.x,o.y,r.right,r.bottom)-o.radius)),s*=-1}else s=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===s||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==s&&(t.onOverlap||e.onOverlap)&&this.emit(u.OVERLAP,t.gameObject,e.gameObject,t,e),0!==s;var a=t.center.x-e.center.x,l=t.center.y-e.center.y,c=Math.sqrt(Math.pow(a,2)+Math.pow(l,2)),d=(e.center.x-t.center.x)/c||0,f=(e.center.y-t.center.y)/c||0,v=2*(t.velocity.x*d+t.velocity.y*f-e.velocity.x*d-e.velocity.y*f)/(t.mass+e.mass);t.immovable||(t.velocity.x=t.velocity.x-v*t.mass*d,t.velocity.y=t.velocity.y-v*t.mass*f),e.immovable||(e.velocity.x=e.velocity.x+v*e.mass*d,e.velocity.y=e.velocity.y+v*e.mass*f);var m=e.velocity.x-t.velocity.x,y=e.velocity.y-t.velocity.y,x=Math.atan2(y,m),T=this._frameTime;return t.immovable||e.immovable||(s/=2),t.immovable||(t.x+=t.velocity.x*T-s*Math.cos(x),t.y+=t.velocity.y*T-s*Math.sin(x)),e.immovable||(e.x+=e.velocity.x*T+s*Math.cos(x),e.y+=e.velocity.y*T+s*Math.sin(x)),t.velocity.x*=t.bounce.x,t.velocity.y*=t.bounce.y,e.velocity.x*=e.bounce.x,e.velocity.y*=e.bounce.y,(t.onCollide||e.onCollide)&&this.emit(u.COLLIDE,t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body||(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),0))},collideSpriteVsGroup:function(t,e,i,n,s,r){var o,h,l,u=t.body;if(0!==e.length&&u&&u.enable&&!u.checkCollision.none)if(this.useTree){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===a.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(h=d.length,o=0;oc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(a,h,l,u);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,c={left:0,right:0,top:0,bottom:0},d=!1,f=0;f * @author Benjamin D. Richards * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(50),r=i(218),o=i(173),a=i(11),h=i(48),l=i(3),u=new n({initialize:function(t,e){var i=e.displayWidth?e.displayWidth:64,n=e.displayHeight?e.displayHeight:64;this.world=t,this.gameObject=e,this.transform={x:e.x,y:e.y,rotation:e.angle,scaleX:e.scaleX,scaleY:e.scaleY,displayOriginX:e.displayOriginX,displayOriginY:e.displayOriginY},this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new l,this.position=new l(e.x-e.scaleX*e.displayOriginX,e.y-e.scaleY*e.displayOriginY),this.prev=new l(e.x,e.y),this.prevFrame=new l(e.x,e.y),this.allowRotation=!0,this.rotation=e.angle,this.preRotation=e.angle,this.width=i,this.height=n,this.sourceWidth=i,this.sourceHeight=n,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(i/2),this.halfHeight=Math.abs(n/2),this.center=new l(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new l,this.newVelocity=new l,this.deltaMax=new l,this.acceleration=new l,this.allowDrag=!0,this.drag=new l,this.allowGravity=!0,this.gravity=new l,this.bounce=new l,this.worldBounce=null,this.customBoundsRectangle=t.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new l(1e4,1e4),this.maxSpeed=-1,this.friction=new l(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=s.FACING_NONE,this.immovable=!1,this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.syncBounds=!1,this.physicsType=s.DYNAMIC_BODY,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new a},updateBounds:function(){var t=this.gameObject,e=this.transform;if(t.parentContainer){var i=t.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);e.x=i.tx,e.y=i.ty,e.rotation=o(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY}else e.x=t.x,e.y=t.y,e.rotation=t.angle,e.scaleX=t.scaleX,e.scaleY=t.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY;var n=!1;if(this.syncBounds){var s=t.getBounds(this._bounds);this.width=s.width,this.height=s.height,n=!0}else{var r=Math.abs(e.scaleX),a=Math.abs(e.scaleY);this._sx===r&&this._sy===a||(this.width=this.sourceWidth*r,this.height=this.sourceHeight*a,this._sx=r,this._sy=a,n=!0)}n&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},resetFlags:function(){var t=this.wasTouching,e=this.touching,i=this.blocked;t.none=e.none,t.up=e.up,t.down=e.down,t.left=e.left,t.right=e.right,e.none=!0,e.up=!1,e.down=!1,e.left=!1,e.right=!1,i.none=!0,i.up=!1,i.down=!1,i.left=!1,i.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(t,e){t&&this.resetFlags(),this.updateBounds();var i=this.transform;this.position.x=i.x+i.scaleX*(this.offset.x-i.displayOriginX),this.position.y=i.y+i.scaleY*(this.offset.y-i.displayOriginY),this.updateCenter(),this.rotation=i.rotation,this.preRotation=this.rotation,this.moves&&(this.prev.x=this.position.x,this.prev.y=this.position.y,this.prevFrame.x=this.position.x,this.prevFrame.y=this.position.y),t&&this.update(e)},update:function(t){if(this.prev.x=this.position.x,this.prev.y=this.position.y,this.moves){this.world.updateMotion(this,t);var e=this.velocity.x,i=this.velocity.y;this.newVelocity.set(e*t,i*t),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(i,e),this.speed=Math.sqrt(e*e+i*i),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit(r.WORLD_BOUNDS,this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)}this._dx=this.position.x-this.prev.x,this._dy=this.position.y-this.prev.y},postUpdate:function(){var t=this.position.x-this.prevFrame.x,e=this.position.y-this.prevFrame.y;if(this.moves){var i=this.deltaMax.x,n=this.deltaMax.y;0!==i&&0!==t&&(t<0&&t<-i?t=-i:t>0&&t>i&&(t=i)),0!==n&&0!==e&&(e<0&&e<-n?e=-n:e>0&&e>n&&(e=n)),this.gameObject.x+=t,this.gameObject.y+=e}t<0?this.facing=s.FACING_LEFT:t>0&&(this.facing=s.FACING_RIGHT),e<0?this.facing=s.FACING_UP:e>0&&(this.facing=s.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this._tx=t,this._ty=e},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y,r=!1;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,r=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,r=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&n.getCenter){var s=(n.width-t)/2,r=(n.height-e)/2;this.offset.set(s,r)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft?i.getTopLeft(this.position):this.position.set(t,e),this.prev.copy(this.position),this.prevFrame.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i){void 0===t&&(t=!0),this.collideWorldBounds=t;var n=void 0!==e,s=void 0!==i;return(n||s)&&(this.worldBounce||(this.worldBounce=new l),n&&(this.worldBounce.x=e),s&&(this.worldBounce.y=i)),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){this.velocity.x=t;var e=t,i=this.velocity.y;return this.speed=Math.sqrt(e*e+i*i),this},setVelocityY:function(t){this.velocity.y=t;var e=this.velocity.x,i=t;return this.speed=Math.sqrt(e*e+i*i),this},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(50);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsX()+e.deltaAbsX()+s;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(r=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxo&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.left=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(50);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsY()+e.deltaAbsY()+s;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dyo&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.up=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},function(t,e,i){ /** * @author Vladimir Agafonkin * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(390);function s(t){if(!(this instanceof s))return new s(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,m,y;for(l=u=1/0,n=e;n<=i-e;n++)f=s=a(t,0,n,this.toBBox),p=r=a(t,n,i,this.toBBox),g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),m=Math.min(f.maxX,p.maxX),y=Math.min(f.maxY,p.maxY),o=Math.max(0,m-g)*Math.max(0,y-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=s},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(55),s=i(0),r=i(50),o=i(48),a=i(3),h=new s({initialize:function(t,e){var i=e.displayWidth?e.displayWidth:64,n=e.displayHeight?e.displayHeight:64;this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=i,this.height=n,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s-this.halfWidth,r-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},function(t,e){var i={};t.exports=i,i.create=function(t,e){var n=t.bodyA,s=t.bodyB,r={id:i.id(n,s),bodyA:n,bodyB:s,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||s.isSensor,timeCreated:e,timeUpdated:e,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return i.update(r,t,e),r},i.update=function(t,e,n){if(t.collision=e,e.collided){var s=e.supports,r=t.activeContacts,o=e.parentA,a=e.parentB;t.inverseMass=o.inverseMass+a.inverseMass,t.friction=Math.min(o.friction,a.friction),t.frictionStatic=Math.max(o.frictionStatic,a.frictionStatic),t.restitution=Math.max(o.restitution,a.restitution),t.slop=Math.max(o.slop,a.slop);for(var h=0;h * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ var n=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(24);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(101);t.exports=function(t,e,i){if(n(t,e,i)){var s=i.data[e][t];return null!==s&&s.index>-1}return!1}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(74),s=i(101),r=i(220);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h):null}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(32),s=i(223),r=i(478),o=i(479),a=i(490);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(32),s=i(223);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map((function(t){return t.split(",")})),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(32),s=i(103),r=i(480),o=i(482),a=i(483),h=i(486),l=i(488),u=i(489);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties,renderOrder:e.renderorder,infinite:e.infinite});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=l(c),u(c),c}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(481),s=i(2),r=i(102),o=i(224),a=i(74),h=i(225);t.exports=function(t,e){for(var i=s(t,"infinite",!1),l=[],u=[],c=h(t);c.i0;)if(c.i>=c.layers.length){if(u.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}c=u.pop()}else{var d=c.layers[c.i];if(c.i++,"tilelayer"===d.type)if(d.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+d.name+"'");else{if(d.encoding&&"base64"===d.encoding){if(d.chunks)for(var f=0;f0?((v=new a(p,g.gid,O,R,t.tilewidth,t.tileheight)).rotation=g.rotation,v.flipX=g.flipped,y[R][O]=v):(m=e?null:new a(p,-1,O,R,t.tilewidth,t.tileheight),y[R][O]=m),++x===S.width&&(C++,x=0)}}else{p=new r({name:c.name+d.name,x:c.x+s(d,"offsetx",0)+d.x,y:c.y+s(d,"offsety",0)+d.y,width:d.width,height:d.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:c.opacity*d.opacity,visible:c.visible&&d.visible,properties:s(d,"properties",[])});for(var L=[],D=0,k=d.data.length;D0?((v=new a(p,g.gid,x,y.length,t.tilewidth,t.tileheight)).rotation=g.rotation,v.flipX=g.flipped,L.push(v)):(m=e?null:new a(p,-1,x,y.length,t.tilewidth,t.tileheight),L.push(m)),++x===d.width&&(y.push(L),x=0,L=[])}p.data=y,l.push(p)}else if("group"===d.type){var F=h(t,d,c);u.push(c),c=F}}return l}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i/4),s=0;s>>0;return n}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(2),s=i(225);t.exports=function(t){for(var e=[],i=[],r=s(t);r.i0;)if(r.i>=r.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=i.pop()}else{var o=r.layers[r.i];if(r.i++,"imagelayer"===o.type){var a=n(o,"offsetx",0)+n(o,"startx",0),h=n(o,"offsety",0)+n(o,"starty",0);e.push({name:r.name+o.name,image:o.image,x:r.x+a+o.x,y:r.y+h+o.y,alpha:r.opacity*o.opacity,visible:r.visible&&o.visible,properties:n(o,"properties",{})})}else if("group"===o.type){var l=s(t,o,r);i.push(r),r=l}}return e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(104),s=i(484),r=i(226);t.exports=function(t){for(var e,i=[],o=[],a=null,h=0;h1){if(Array.isArray(l.tiles)){for(var c={},d={},f=0;f * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(108);t.exports=function(t,e){for(var i={},s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(2),s=i(226),r=i(487),o=i(225);t.exports=function(t){for(var e=[],i=[],a=o(t);a.i0;)if(a.i>=a.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=i.pop()}else{var h=a.layers[a.i];if(a.i++,h.opacity*=a.opacity,h.visible=a.visible&&h.visible,"objectgroup"===h.type){h.name=a.name+h.name;for(var l=a.x+n(h,"startx",0)+n(h,"offsetx",0),u=a.y+n(h,"starty",0)+n(h,"offsety",0),c=[],d=0;d * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(2),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","object layer"),this.opacity=s(t,"opacity",1),this.properties=s(t,"properties",{}),this.propertyTypes=s(t,"propertytypes",{}),this.type=s(t,"type","objectgroup"),this.visible=s(t,"visible",!0),this.objects=s(t,"objects",[])}});t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(104);t.exports=function(t){var e,i,s=[];for(e=0;e * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(18);t.exports=function(t){for(var e,i,s,r,o,a=0;a * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(32),s=i(103),r=i(491),o=i(492);t.exports=function(t,e,i){if(0===e.layer.length)return console.warn("No layers found in the Weltmeister map: "+t),null;for(var a=0,h=0,l=0;la&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(102),s=i(74);t.exports=function(t,e){for(var i=[],r=0;r-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(104);t.exports=function(t){for(var e=[],i=[],s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(35),r=i(494),o=i(18),a=i(32),h=i(102),l=i(330),u=i(80),c=i(495),d=i(74),f=i(141),p=i(104),g=new n({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.renderOrder=e.renderOrder,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0},setRenderOrder:function(t){var e=["right-down","left-down","right-up","left-up"];return"number"==typeof t&&(t=e[t]),e.indexOf(t)>-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(null==e&&(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===a.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,n),u.setSpacing(s,r),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0),(u=new p(t,o,i,n,s,r)).setImage(h),this.tilesets.push(u),u)},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new c(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:null!==a?(f.Copy(t,e,i,n,s,r,o,a),this):null},createBlankDynamicLayer:function(t,e,i,n,s,o,a,l){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===a&&(a=this.tileWidth),void 0===l&&(l=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var u,c=new h({name:t,tileWidth:a,tileHeight:l,width:s,height:o}),f=0;f-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return n},removeTileAt:function(t,e,i,n,s){return s=this.getLayer(s),this._isStaticCall(s,"removeTileAt")||null===s?null:f.RemoveTileAt(t,e,i,n,s)},removeTileAtWorldXY:function(t,e,i,n,s,r){return r=this.getLayer(r),this._isStaticCall(r,"removeTileAtWorldXY")||null===r?null:f.RemoveTileAtWorldXY(t,e,i,n,s,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(f.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(12),r=i(1343),o=i(13),a=i(141),h=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.Transform,s.Visible,s.ScrollFactor,r],initialize:function(t,e,i,n,s,r){o.call(this,t,"DynamicTilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.culledTiles=[],this.skipCull=!1,this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=a.CullTiles,this._renderOrder=0,this.gidMap=[],this.setTilesets(n),this.setAlpha(this.layer.alpha),this.setPosition(s,r),this.setOrigin(),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.initPipeline("TextureTintPipeline")},setTilesets:function(t){var e=[],i=[],n=this.tilemap;Array.isArray(t)||(t=[t]);for(var s=0;s=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return a.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,n){return a.CalculateFacesWithin(t,e,i,n,this.layer),this},createFromTiles:function(t,e,i,n,s){return a.CreateFromTiles(t,e,i,n,s,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,n,s,r,o){return a.Copy(t,e,i,n,s,r,o,this.layer),this},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],o.prototype.destroy.call(this))},fill:function(t,e,i,n,s,r){return a.Fill(t,e,i,n,s,r,this.layer),this},filterTiles:function(t,e,i,n,s,r,o){return a.FilterTiles(t,e,i,n,s,r,o,this.layer)},findByIndex:function(t,e,i){return a.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,s,r,o){return a.FindTile(t,e,i,n,s,r,o,this.layer)},forEachTile:function(t,e,i,n,s,r,o){return a.ForEachTile(t,e,i,n,s,r,o,this.layer),this},getTileAt:function(t,e,i){return a.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,n){return a.GetTileAtWorldXY(t,e,i,n,this.layer)},getTilesWithin:function(t,e,i,n,s){return a.GetTilesWithin(t,e,i,n,s,this.layer)},getTilesWithinShape:function(t,e,i){return a.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,s,r){return a.GetTilesWithinWorldXY(t,e,i,n,s,r,this.layer)},hasTileAt:function(t,e){return a.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return a.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,n){return a.PutTileAt(t,e,i,n,this.layer)},putTileAtWorldXY:function(t,e,i,n,s){return a.PutTileAtWorldXY(t,e,i,n,s,this.layer)},putTilesAt:function(t,e,i,n){return a.PutTilesAt(t,e,i,n,this.layer),this},randomize:function(t,e,i,n,s){return a.Randomize(t,e,i,n,s,this.layer),this},removeTileAt:function(t,e,i,n){return a.RemoveTileAt(t,e,i,n,this.layer)},removeTileAtWorldXY:function(t,e,i,n,s){return a.RemoveTileAtWorldXY(t,e,i,n,s,this.layer)},renderDebug:function(t,e){return a.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,n,s,r){return a.ReplaceByIndex(t,e,i,n,s,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,n){return a.SetCollision(t,e,i,this.layer,n),this},setCollisionBetween:function(t,e,i,n){return a.SetCollisionBetween(t,e,i,n,this.layer),this},setCollisionByProperty:function(t,e,i){return a.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return a.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return a.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return a.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,n,s,r){return a.SetTileLocationCallback(t,e,i,n,s,r,this.layer),this},shuffle:function(t,e,i,n){return a.Shuffle(t,e,i,n,this.layer),this},swapByIndex:function(t,e,i,n,s,r){return a.SwapByIndex(t,e,i,n,s,r,this.layer),this},tileToWorldX:function(t,e){return a.TileToWorldX(t,e,this.layer)},tileToWorldY:function(t,e){return a.TileToWorldY(t,e,this.layer)},tileToWorldXY:function(t,e,i,n){return a.TileToWorldXY(t,e,i,n,this.layer)},weightedRandomize:function(t,e,i,n,s){return a.WeightedRandomize(t,e,i,n,s,this.layer),this},worldToTileX:function(t,e,i){return a.WorldToTileX(t,e,i,this.layer)},worldToTileY:function(t,e,i){return a.WorldToTileY(t,e,i,this.layer)},worldToTileXY:function(t,e,i,n,s){return a.WorldToTileXY(t,e,i,n,s,this.layer)}});t.exports=h},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(12),r=i(20),o=i(13),a=i(1346),h=i(141),l=i(29),u=i(9),c=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,a){o.call(this,t,"StaticTilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.culledTiles=[],this.skipCull=!1,this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=h.CullTiles,this.renderer=t.sys.game.renderer,this.vertexBuffer=[],this.bufferData=[],this.vertexViewF32=[],this.vertexViewU32=[],this.dirty=[],this.vertexCount=[],this._renderOrder=0,this._tempMatrix=new l,this.gidMap=[],this.setTilesets(n),this.setAlpha(this.layer.alpha),this.setPosition(s,a),this.setOrigin(),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.updateVBOData(),this.initPipeline("TextureTintPipeline"),t.sys.game.events.on(r.CONTEXT_RESTORED,(function(){this.updateVBOData()}),this)},setTilesets:function(t){var e=[],i=[],n=this.tilemap;Array.isArray(t)||(t=[t]);for(var s=0;sv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(1===p)for(o=0;o=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(2===p)for(o=u-1;o>=0;o--)for(a=0;av||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(3===p)for(o=u-1;o>=0;o--)for(a=l-1;a>=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));this.dirty[e]=!1,null===m?(m=i.createVertexBuffer(y,n.STATIC_DRAW),this.vertexBuffer[e]=m):(i.setVertexBuffer(m),n.bufferSubData(n.ARRAY_BUFFER,0,y))}return this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,l=i.tileHeight,c=h/2,d=l/2,f=a.x/n,p=a.y/s,g=(a.x+h)/n,v=(a.y+l)/s,m=this._tempMatrix,y=-c,x=-d;e.flipX&&(h*=-1,y+=i.tileWidth),e.flipY&&(l*=-1,x+=i.tileHeight);var T=y+h,w=x+l;m.applyITRS(c+e.pixelX,d+e.pixelY,e.rotation,1,1);var b=u.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),E=m.getX(y,x),S=m.getY(y,x),_=m.getX(y,w),A=m.getY(y,w),C=m.getX(T,w),M=m.getY(T,w),P=m.getX(T,x),O=m.getY(T,x);r.roundPixels&&(E=Math.round(E),S=Math.round(S),_=Math.round(_),A=Math.round(A),C=Math.round(C),M=Math.round(M),P=Math.round(P),O=Math.round(O));var R=this.vertexViewF32[o],L=this.vertexViewU32[o];return R[++t]=E,R[++t]=S,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=b,R[++t]=_,R[++t]=A,R[++t]=f,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=E,R[++t]=S,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=b,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=P,R[++t]=O,R[++t]=g,R[++t]=p,R[++t]=0,L[++t]=b,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),t>=0&&t<4){this._renderOrder=t;for(var e=0;e * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(2),r=new n({initialize:function(t){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(t)},reset:function(t){return this.delay=s(t,"delay",0),this.repeat=s(t,"repeat",0),this.loop=s(t,"loop",!1),this.callback=s(t,"callback",void 0),this.callbackScope=s(t,"callbackScope",this.callback),this.args=s(t,"args",[]),this.timeScale=s(t,"timeScale",1),this.startAt=s(t,"startAt",0),this.paused=s(t,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1355);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(6);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(230),s=i(14),r=i(88),o=i(69),a=i(145),h=i(6),l=i(229),u=i(231),c=i(233);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),m=h(e,"easeParams",i.easeParams),y=o(h(e,"ease",i.ease),m),x=a(e,"hold",i.hold),T=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),b=r(e,"yoyo",i.yoyo),E=[],S=l("value",f),_=c(p[0],0,"value",S.getEnd,S.getStart,S.getActive,y,g,v,b,x,T,w,!1,!1);_.start=d,_.current=d,_.to=f,E.push(_);var A=new u(t,E,p);A.offset=s(e,"offset",null),A.completeDelay=s(e,"completeDelay",0),A.loop=Math.round(s(e,"loop",0)),A.loopDelay=Math.round(s(e,"loopDelay",0)),A.paused=r(e,"paused",!1),A.useFrames=r(e,"useFrames",!1);for(var C=h(e,"callbackScope",A),M=[A,null],P=u.TYPES,O=0;O * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(69),s=i(6),r=i(15);t.exports=function(t,e){void 0===e&&(e={});var i=s(e,"start",0),o=s(e,"ease",null),a=s(e,"grid",null),h=s(e,"from",0),l="first"===h,u="center"===h,c="last"===h,d="number"==typeof h,f=Array.isArray(t),p=f?parseFloat(t[0]):parseFloat(t),g=f?parseFloat(t[1]):0,v=Math.max(p,g);if(f&&(i+=p),a){var m=a[0],y=a[1],x=0,T=0,w=0,b=0,E=[];c?(x=m-1,T=y-1):d?(x=h%m,T=Math.floor(h/m)):u&&(x=(m-1)/2,T=(y-1)/2);for(var S=r.MIN_SAFE_INTEGER,_=0;_S&&(S=C),E[_][A]=C}}}var M=o?n(o):null;return a?function(t,e,n,s){var r,o=0,a=s%m,h=Math.floor(s/m);if(a>=0&&a=0&&h * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(67),s=i(230),r=i(14),o=i(88),a=i(69),h=i(145),l=i(228),u=i(498),c=i(6),d=i(502),f=i(146);t.exports=function(t,e){var i=new d(t),p=u(e);if(0===p.length)return i.paused=!0,i;var g=n(s);g.targets=l(e);var v=r(e,"totalDuration",0);g.duration=v>0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var m=0;m * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(10),r=i(232),o=i(146),a=i(89),h=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.isTimeline=!0,this.data=[],this.totalData=0,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=a.PENDING_ADD,this._pausedState=a.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},dispatchTimelineEvent:function(t,e){this.emit(t,this),e&&e.func.apply(e.scope,e.params)},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===a.ACTIVE},add:function(t){return this.queue(o(this,t))},queue:function(t){return this.isPlaying()||(t.parent=this,t.parentIsTimeline=!0,this.data.push(t),this.totalData=this.data.length),this},hasOffset:function(t){return null!==t.offset},isOffsetAbsolute:function(t){return"number"==typeof t},isOffsetRelative:function(t){if("string"==typeof t){var e=t[0];if("-"===e||"+"===e)return!0}return!1},getRelativeOffset:function(t,e){var i=t[0],n=parseFloat(t.substr(2)),s=e;switch(i){case"+":s+=n;break;case"-":s-=n}return Math.max(0,s)},calcDuration:function(){for(var t=0,e=0,i=0,n=0;n0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=a.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=a.LOOP_DELAY):(this.state=a.ACTIVE,this.dispatchTimelineEvent(r.TIMELINE_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=a.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=a.PENDING_REMOVE,this.dispatchTimelineEvent(r.TIMELINE_COMPLETE,this.callbacks.onComplete))},update:function(t,e){if(this.state!==a.PAUSED){switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case a.ACTIVE:for(var i=this.totalData,n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(151),s=i(0),r=i(111),o=new s({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.once(r.REMOVE_ANIMATION,this.remove,this),this.isPlaying=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this._timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this._delay=0,this._repeat=0,this._repeatDelay=0,this._yoyo=!1,this.forward=!0,this._reverse=!1,this.accumulator=0,this.nextTick=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(t){return t instanceof n&&(t=t.key),this.nextAnim=t,this.parent},setDelay:function(t){return void 0===t&&(t=0),this._delay=t,this.parent},getDelay:function(){return this._delay},delayedPlay:function(t,e,i){return this.play(e,!0,i),this.nextTick+=t,this.parent},getCurrentKey:function(){if(this.currentAnim)return this.currentAnim.key},load:function(t,e){return void 0===e&&(e=0),this.isPlaying&&this.stop(),this.animationManager.load(this,t,e),this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.updateFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.updateFrame(t),this.parent},isPaused:{get:function(){return this._paused}},play:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=0),t instanceof n&&(t=t.key),e&&this.isPlaying&&this.currentAnim.key===t?this.parent:(this.forward=!0,this._reverse=!1,this._paused=!1,this._wasPlaying=!0,this._startAnimation(t,i))},playReverse:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=0),t instanceof n&&(t=t.key),e&&this.isPlaying&&this.currentAnim.key===t?this.parent:(this.forward=!1,this._reverse=!0,this._startAnimation(t,i))},_startAnimation:function(t,e){this.load(t,e);var i=this.currentAnim,n=this.parent;if(!i)return n;this.repeatCounter=-1===this._repeat?Number.MAX_VALUE:this._repeat,i.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,i.showOnStart&&(n.visible=!0);var s=this.currentFrame;return i.emit(r.ANIMATION_START,i,s,n),n.emit(r.SPRITE_ANIMATION_KEY_START+t,i,s,n),n.emit(r.SPRITE_ANIMATION_START,i,s,n),n},reverse:function(){return this.isPlaying&&(this._reverse=!this._reverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame.progress;return this.forward||(t=1-t),t},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},remove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},getRepeat:function(){return this._repeat},setRepeat:function(t){return this._repeat=t,this.repeatCounter=-1===t?Number.MAX_VALUE:t,this.parent},getRepeatDelay:function(){return this._repeatDelay},setRepeatDelay:function(t){return this._repeatDelay=t,this.parent},restart:function(t){void 0===t&&(t=!1);var e=this.currentAnim;e.getFirstTick(this,t),this.forward=!0,this.isPlaying=!0,this.pendingRepeat=!1,this._paused=!1,this.updateFrame(e.frames[0]);var i=this.parent,n=this.currentFrame;return e.emit(r.ANIMATION_RESTART,e,n,i),i.emit(r.SPRITE_ANIMATION_KEY_RESTART+e.key,e,n,i),i.emit(r.SPRITE_ANIMATION_RESTART,e,n,i),this.parent},stop:function(){this._pendingStop=0,this.isPlaying=!1;var t=this.parent,e=this.currentAnim,i=this.currentFrame;if(e&&(e.emit(r.ANIMATION_COMPLETE,e,i,t),t.emit(r.SPRITE_ANIMATION_KEY_COMPLETE+e.key,e,i,t),t.emit(r.SPRITE_ANIMATION_COMPLETE,e,i,t)),this.nextAnim){var n=this.nextAnim;this.nextAnim=null,this.play(n)}return t},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopOnRepeat:function(){return this._pendingStop=2,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},setTimeScale:function(t){return void 0===t&&(t=1),this._timeScale=t,this.parent},getTimeScale:function(){return this._timeScale},getTotalFrames:function(){return this.currentAnim.frames.length},update:function(t,e){if(this.currentAnim&&this.isPlaying&&!this.currentAnim.paused){if(this.accumulator+=e*this._timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.currentAnim.completeAnimation(this);this.accumulator>=this.nextTick&&this.currentAnim.setFrame(this)}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),e},updateFrame:function(t){var e=this.setCurrentFrame(t);if(this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;e.emit(r.SPRITE_ANIMATION_KEY_UPDATE+i.key,i,t,e),e.emit(r.SPRITE_ANIMATION_UPDATE,i,t,e),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,e,i){ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(505),s=i(36),r=i(0),o=i(33),a=i(506),h=i(92),l=i(29),u=new r({initialize:function(t){this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.gameCanvas=t.canvas;var e={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d",e),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=a(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.init()},init:function(){this.game.scale.on(h.RESIZE,this.onResize,this);var t=this.game.scale.baseSize;this.resize(t.width,t.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0},render:function(t,e,i,n){var r=e.list,o=r.length,a=n._cx,h=n._cy,l=n._cw,u=n._ch,c=n.renderToTexture?n.context:t.sys.context;c.save(),this.game.scene.customViewports&&(c.beginPath(),c.rect(a,h,l,u),c.clip()),this.currentContext=c;var d=n.mask;d&&d.preRenderCanvas(this,null,n._maskCamera),n.transparent||(c.fillStyle=n.backgroundColor.rgba,c.fillRect(a,h,l,u)),c.globalAlpha=n.alpha,c.globalCompositeOperation="source-over",this.drawCount+=r.length,n.renderToTexture&&n.emit(s.PRE_RENDER,n),n.matrix.copyToContext(c);for(var f=0;f=0?y=-(y+d):y<0&&(y=Math.abs(y)-d)),t.flipY&&(x>=0?x=-(x+f):x<0&&(x=Math.abs(x)-f))}var w=1,b=1;t.flipX&&(p||(y+=-e.realWidth+2*v),w=-1),t.flipY&&(p||(x+=-e.realHeight+2*m),b=-1),a.applyITRS(t.x,t.y,t.rotation,t.scaleX*w,t.scaleY*b),o.copyFrom(i.matrix),n?(o.multiplyWithOffset(n,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=t.x,a.f=t.y,o.multiply(a,h)):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY,o.multiply(a,h)),r.save(),h.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=s,r.imageSmoothingEnabled=!(!this.antialias||e.source.scaleMode),r.drawImage(e.source.image,u,c,d,f,y,x,d/g,f/g),r.restore()}},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=u},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(26),s=i(31),r=i(2);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=r(e,"width",t.width),c=r(e,"height",t.height);if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new s(d[0],d[1],d[2],d[3]/255))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var f=n.createWebGL(this,u,c);f.getContext("2d").drawImage(t,h,l,u,c,0,0,u,c);var p=new Image;p.onerror=function(){i.call(null),n.remove(f)},p.onload=function(){i.call(null,p),n.remove(f)},p.src=f.toDataURL(o,a)}else{var g=new Image;g.onerror=function(){i.call(null)},g.onload=function(){i.call(null,g)},g.src=t.toDataURL(o,a)}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(52),s=i(316);t.exports=function(){var t=[],e=s.supportNewBlendModes,i="source-over";return t[n.NORMAL]=i,t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":i,t[n.SCREEN]=e?"screen":i,t[n.OVERLAY]=e?"overlay":i,t[n.DARKEN]=e?"darken":i,t[n.LIGHTEN]=e?"lighten":i,t[n.COLOR_DODGE]=e?"color-dodge":i,t[n.COLOR_BURN]=e?"color-burn":i,t[n.HARD_LIGHT]=e?"hard-light":i,t[n.SOFT_LIGHT]=e?"soft-light":i,t[n.DIFFERENCE]=e?"difference":i,t[n.EXCLUSION]=e?"exclusion":i,t[n.HUE]=e?"hue":i,t[n.SATURATION]=e?"saturation":i,t[n.COLOR]=e?"color":i,t[n.LUMINOSITY]=e?"luminosity":i,t[n.ERASE]="destination-out",t[n.SOURCE_IN]="source-in",t[n.SOURCE_OUT]="source-out",t[n.SOURCE_ATOP]="source-atop",t[n.DESTINATION_OVER]="destination-over",t[n.DESTINATION_IN]="destination-in",t[n.DESTINATION_OUT]="destination-out",t[n.DESTINATION_ATOP]="destination-atop",t[n.LIGHTER]="lighter",t[n.COPY]="copy",t[n.XOR]="xor",t}},function(t,e,i){ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(91),s=i(36),r=i(0),o=i(33),a=i(20),h=i(120),l=i(1),u=i(92),c=i(80),d=i(121),f=i(29),p=i(9),g=i(508),v=i(509),m=i(510),y=i(237),x=i(511),T=new r({initialize:function(t){var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,resolution:e.resolution,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=o.WEBGL,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=l,this.contextRestoredHandler=l,this.gl=null,this.supportedExtensions=null,this.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.blankTexture=null,this.defaultCamera=new n(0,0,0,0),this._tempMatrix1=new f,this._tempMatrix2=new f,this._tempMatrix3=new f,this._tempMatrix4=new f,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.mipmapFilter=null,this.init(this.config)},init:function(t){var e,i=this.game,n=this.canvas,s=t.backgroundColor;if(!(e=i.config.context?i.config.context:n.getContext("webgl",t.contextCreation)||n.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var r=this;this.contextLostHandler=function(t){r.contextLost=!0,r.game.events.emit(a.CONTEXT_LOST,r),t.preventDefault()},this.contextRestoredHandler=function(){r.contextLost=!1,r.init(r.config),r.game.events.emit(a.CONTEXT_RESTORED,r)},n.addEventListener("webglcontextlost",this.contextLostHandler,!1),n.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),i.context=e;for(var h=0;h<=27;h++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats[0]=e.BYTE,this.glFormats[1]=e.SHORT,this.glFormats[2]=e.UNSIGNED_BYTE,this.glFormats[3]=e.UNSIGNED_SHORT,this.glFormats[4]=e.FLOAT,this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};var l=e.getSupportedExtensions();t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE));var u="WEBGL_compressed_texture_",c="WEBKIT_"+u;this.compression.ETC1=e.getExtension(u+"etc1")||e.getExtension(c+"etc1"),this.compression.PVRTC=e.getExtension(u+"pvrtc")||e.getExtension(c+"pvrtc"),this.compression.S3TC=e.getExtension(u+"s3tc")||e.getExtension(c+"s3tc"),this.supportedExtensions=l,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(s.redGL,s.greenGL,s.blueGL,s.alphaGL),this.mipmapFilter=e[t.mipmapFilter];for(var f=0;f0&&n>0;if(o&&a){var h=o[0],l=o[1],u=o[2],c=o[3];a=h!==t||l!==e||u!==i||c!==n}a&&(this.flush(),r.scissor(t,s-e-n,i,n))},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},setPipeline:function(t,e){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(e),this.currentPipeline},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},rebindPipeline:function(t){var e=this.gl;e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),this.hasActiveStencilMask()?e.clear(e.DEPTH_BUFFER_BIT):(e.disable(e.STENCIL_TEST),e.clear(e.DEPTH_BUFFER_BIT|e.STENCIL_BUFFER_BIT)),e.viewport(0,0,this.width,this.height),this.setBlendMode(0,!0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.blankTexture.glTexture),this.currentActiveTextureUnit=0,this.currentTextures[0]=this.blankTexture.glTexture,this.currentPipeline=t,this.currentPipeline.bind(),this.currentPipeline.onBind()},clearPipeline:function(){this.flush(),this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.setBlendMode(0,!0)},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(n.equation),n.func.length>2?i.blendFuncSeparate(n.func[0],n.func[1],n.func[2],n.func[3]):i.blendFunc(n.func[0],n.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setBlankTexture:function(t){void 0===t&&(t=!1),!t&&0===this.currentActiveTextureUnit&&this.currentTextures[0]||this.setTexture2D(this.blankTexture.glTexture,0)},setTexture2D:function(t,e,i){void 0===i&&(i=!0);var n=this.gl;return t!==this.currentTextures[e]&&(i&&this.flush(),this.currentActiveTextureUnit!==e&&(n.activeTexture(n.TEXTURE0+e),this.currentActiveTextureUnit=e),n.bindTexture(n.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.width,s=this.height;return t!==this.currentFramebuffer&&(t&&t.renderTexture?(n=t.renderTexture.width,s=t.renderTexture.height):this.flush(),i.bindFramebuffer(i.FRAMEBUFFER,t),i.viewport(0,0,n,s),e&&(t?(this.drawingBufferHeight=s,this.pushScissor(0,0,n,s)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var s=this.gl,r=s.NEAREST,a=s.NEAREST,l=s.CLAMP_TO_EDGE;e=t?t.width:e,i=t?t.height:i;var u=h(e,i);return u&&(l=s.REPEAT),n===o.ScaleModes.LINEAR&&this.config.antialias&&(r=u?this.mipmapFilter:s.LINEAR,a=s.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,r,a,l,l,s.RGBA,t):this.createTexture2D(0,r,a,l,l,s.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,l,u,c,d){u=null==u||u,void 0===c&&(c=!1),void 0===d&&(d=!1);var f=this.gl,p=f.createTexture();return this.setTexture2D(p,0),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,e),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,i),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,s),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,n),f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,d),null==o?f.texImage2D(f.TEXTURE_2D,t,r,a,l,0,r,f.UNSIGNED_BYTE,null):(c||(a=o.width,l=o.height),f.texImage2D(f.TEXTURE_2D,t,r,r,f.UNSIGNED_BYTE,o)),h(a,l)&&f.generateMipmap(f.TEXTURE_2D),this.setTexture2D(null,0),p.isAlphaPremultiplied=u,p.isRenderTexture=!1,p.width=a,p.height=l,this.nativeTextures.push(p),p},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s]);return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){var e=this.nativeTextures.indexOf(t);return-1!==e&&c(this.nativeTextures,e),this.gl.deleteTexture(t),this.currentTextures[0]!==t||this.game.pendingDestroy||this.setBlankTexture(!0),this},deleteFramebuffer:function(t){return this.gl.deleteFramebuffer(t),this},deleteProgram:function(t){return this.gl.deleteProgram(t),this},deleteBuffer:function(t){return this.gl.deleteBuffer(t),this},preRenderCamera:function(t){var e=t._cx,i=t._cy,n=t._cw,r=t._ch,o=this.pipelines.TextureTintPipeline,a=t.backgroundColor;if(t.renderToTexture){this.flush(),this.pushScissor(e,i,n,-r),this.setFramebuffer(t.framebuffer);var h=this.gl;h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT),o.projOrtho(e,n+e,i,r+i,-1e3,1e3),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n+e,r+i,p.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL),t.emit(s.PRE_RENDER,t)}else this.pushScissor(e,i,n,r),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n,r,p.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){this.setPipeline(this.pipelines.TextureTintPipeline);var e=this.pipelines.TextureTintPipeline;if(t.flashEffect.postRenderWebGL(e,p.getTintFromFloats),t.fadeEffect.postRenderWebGL(e,p.getTintFromFloats),t.dirty=!1,this.popScissor(),t.renderToTexture){if(e.flush(),this.setFramebuffer(null),t.emit(s.POST_RENDER,t),t.renderToGame){e.projOrtho(0,e.width,e.height,0,-1e3,1e3);var i=p.getTintAppendFloatAlpha;(t.pipeline?t.pipeline:e).batchTexture(t,t.glTexture,t.width,t.height,t.x,t.y,t.width,t.height,t.zoom,t.zoom,t.rotation,t.flipX,!t.flipY,1,1,0,0,0,0,t.width,t.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),t._isTinted&&t.tintFill,0,0,this.defaultCamera,null)}this.setBlankTexture(!0)}t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera))},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.pipelines;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var i=this.config.backgroundColor;t.clearColor(i.redGL,i.greenGL,i.blueGL,i.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}for(var n in t.enable(t.SCISSOR_TEST),e)e[n].onPreRender();this.currentScissor=[0,0,this.width,this.height],this.scissorStack=[this.currentScissor],this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.setPipeline(this.pipelines.TextureTintPipeline)}},render:function(t,e,i,n){if(!this.contextLost){var s=e.list,r=s.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);if(this.preRenderCamera(n),0===r)return this.setBlendMode(o.BlendModes.NORMAL),void this.postRenderCamera(n);this.currentType="";for(var l=this.currentMask,u=0;u0&&r>0&&(this.setTexture2D(e,0),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,this.setTexture2D(null,0)),e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,s=n.NEAREST,r=n.NEAREST,o=t.videoWidth,a=t.videoHeight,l=n.CLAMP_TO_EDGE,u=h(o,a);return!e&&u&&(l=n.REPEAT),this.config.antialias&&(s=u?this.mipmapFilter:n.LINEAR,r=n.LINEAR),this.createTexture2D(0,s,r,l,l,n.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var n=this.gl,s=t.videoWidth,r=t.videoHeight;return s>0&&r>0&&(this.setTexture2D(e,0),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,this.setTexture2D(null,0)),e},setTextureFilter:function(t,e){var i=this.gl,n=[i.LINEAR,i.NEAREST][e];return this.setTexture2D(t,0),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,n),this.setTexture2D(null,0),this},setFloat1:function(t,e,i){return this.setProgram(t),this.gl.uniform1f(this.gl.getUniformLocation(t,e),i),this},setFloat2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2f(this.gl.getUniformLocation(t,e),i,n),this},setFloat3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3f(this.gl.getUniformLocation(t,e),i,n,s),this},setFloat4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4f(this.gl.getUniformLocation(t,e),i,n,s,r),this},setFloat1v:function(t,e,i){return this.setProgram(t),this.gl.uniform1fv(this.gl.getUniformLocation(t,e),i),this},setFloat2v:function(t,e,i){return this.setProgram(t),this.gl.uniform2fv(this.gl.getUniformLocation(t,e),i),this},setFloat3v:function(t,e,i){return this.setProgram(t),this.gl.uniform3fv(this.gl.getUniformLocation(t,e),i),this},setFloat4v:function(t,e,i){return this.setProgram(t),this.gl.uniform4fv(this.gl.getUniformLocation(t,e),i),this},setInt1:function(t,e,i){return this.setProgram(t),this.gl.uniform1i(this.gl.getUniformLocation(t,e),i),this},setInt2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2i(this.gl.getUniformLocation(t,e),i,n),this},setInt3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3i(this.gl.getUniformLocation(t,e),i,n,s),this},setInt4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4i(this.gl.getUniformLocation(t,e),i,n,s,r),this},setMatrix2:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix2fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix3:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix3fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix4:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix4fv(this.gl.getUniformLocation(t,e),i,n),this},getMaxTextures:function(){return this.config.maxTextures},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){for(var t=0;t * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(26),s=i(31),r=i(2);t.exports=function(t,e){var i=t.getContext("experimental-webgl"),o=r(e,"callback"),a=r(e,"type","image/png"),h=r(e,"encoder",.92),l=r(e,"x",0),u=r(e,"y",0),c=r(e,"getPixel",!1),d=r(e,"isFramebuffer",!1),f=d?r(e,"bufferWidth",1):i.drawingBufferWidth,p=d?r(e,"bufferHeight",1):i.drawingBufferHeight;if(c){var g=new Uint8Array(4),v=d?u:p-u;i.readPixels(l,v,1,1,i.RGBA,i.UNSIGNED_BYTE,g),o.call(null,new s(g[0],g[1],g[2],g[3]/255))}else{var m=r(e,"width",f),y=r(e,"height",p),x=m*y*4,T=new Uint8Array(x);i.readPixels(l,p-u-y,m,y,i.RGBA,i.UNSIGNED_BYTE,T);for(var w=n.createWebGL(this,m,y),b=w.getContext("2d"),E=b.getImageData(0,0,m,y),S=E.data,_=0;_ * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(785),r=i(786),o=i(147),a=new n({Extends:o,initialize:function(t){o.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:t.topology?t.topology:t.renderer.gl.TRIANGLES,vertShader:t.vertShader?t.vertShader:r,fragShader:t.fragShader?t.fragShader:s,vertexCapacity:t.vertexCapacity?t.vertexCapacity:3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT,vertices:new Float32Array([-1,1,-1,-7,7,1]).buffer,attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.maxQuads=1,this.resolutionDirty=!0},onBind:function(){o.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.resolutionDirty&&(t.setFloat2(e,"uResolution",this.width,this.height),t.setInt1(e,"uMainSampler",0),t.setInt1(e,"uMaskSampler",1),this.resolutionDirty=!1),this},resize:function(t,e,i){return o.prototype.resize.call(this,t,e,i),this.resolutionDirty=!0,this},beginMask:function(t,e,i){var n=this.renderer,s=this.gl;t.bitmapMask&&s&&(n.flush(),t.prevFramebuffer=n.currentFramebuffer,n.setFramebuffer(t.mainFramebuffer),s.disable(s.STENCIL_TEST),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),n.currentCameraMask.mask!==t&&(n.currentMask.mask=t,n.currentMask.camera=i))},endMask:function(t,e){var i=this.gl,n=this.renderer,s=t.bitmapMask;if(s&&i){n.flush(),n.setFramebuffer(t.maskFramebuffer),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),n.setBlendMode(0,!0),s.renderWebGL(n,s,0,e),n.flush(),n.setFramebuffer(t.prevFramebuffer);var r=n.getCurrentStencilMask();r?(i.enable(i.STENCIL_TEST),r.mask.applyStencil(n,r.camera,!0)):n.currentMask.mask=null,n.setPipeline(this),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,t.maskTexture),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,t.mainTexture),i.uniform1i(i.getUniformLocation(this.program,"uInvertMaskAlpha"),t.invertAlpha),i.drawArrays(this.topology,0,3)}}});t.exports=a},function(t,e,i){ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(787),r=i(237),o=10,a=new n({Extends:r,initialize:function(t){o=t.maxLights,t.fragShader=s.replace("%LIGHT_COUNT%",o.toString()),r.call(this,t),this.defaultNormalMap,this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1])},boot:function(){this.defaultNormalMap=this.game.textures.getFrame("__DEFAULT")},onBind:function(t){r.prototype.onBind.call(this);var e=this.renderer,i=this.program;return this.mvpUpdate(),e.setInt1(i,"uNormSampler",1),e.setFloat2(i,"uResolution",this.width,this.height),t&&this.setNormalMap(t),this},onRender:function(t,e){this.active=!1;var i=t.sys.lights;if(!i||i.lights.length<=0||!i.active)return this;var n=i.cull(e),s=Math.min(n.length,o);if(0===s)return this;this.active=!0;var r,a=this.renderer,h=this.program,l=e.matrix,u={x:0,y:0},c=a.height;for(r=0;r0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,n=Math.cos(i),s=Math.sin(i);e[1]=s,e[3]=-s,e[0]=e[4]=n}else e[0]=e[4]=1,e[1]=e[3]=0;this.renderer.setMatrix3(this.program,"uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},batchSprite:function(t,e,i){if(this.active){var n=t.texture.dataSource[t.frame.sourceIndex];n&&(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),this.setNormalMapRotation(t.rotation),r.prototype.batchSprite.call(this,t,e,i))}}});a.LIGHT_COUNT=o,t.exports=a},function(t,e,i){ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(2),r=i(238),o=i(339),a=i(340),h=i(29),l=i(147),u=new n({Extends:l,Mixins:[r],initialize:function(t){var e=t.renderer.config;l.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:t.renderer.gl.TRIANGLE_STRIP,vertShader:s(t,"vertShader",a),fragShader:s(t,"fragShader",o),vertexCapacity:s(t,"vertexCapacity",6*e.batchSize),vertexSize:s(t,"vertexSize",5*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT),attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTexCoord",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:2*Float32Array.BYTES_PER_ELEMENT},{name:"inTintEffect",size:1,type:t.renderer.gl.FLOAT,normalized:!1,offset:4*Float32Array.BYTES_PER_ELEMENT},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:5*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=e.batchSize,this.batches=[],this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.mvpInit()},onBind:function(){return l.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return l.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},setTexture2D:function(t,e){return void 0===t&&(t=this.renderer.blankTexture.glTexture),void 0===e&&(e=0),this.requireTextureBatch(t,e)&&this.pushBatch(t,e),this},requireTextureBatch:function(t,e){var i=this.batches,n=i.length;return!(n>0&&(e>0?i[n-1].textures[e-1]:i[n-1].texture)===t)},pushBatch:function(t,e){if(0===e)this.batches.push({first:this.vertexCount,texture:t,textures:[]});else{var i=[];i[e-1]=t,this.batches.push({first:this.vertexCount,texture:null,textures:i})}},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.vertexCount,r=this.topology,o=this.vertexSize,a=this.renderer,h=this.batches,l=h.length,u=0,c=null;if(0===l||0===s)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,s*o));for(var d=0;d0){for(e=0;e0){for(e=0;e0&&(a.setTexture2D(c.texture,0,!1),n.drawArrays(r,c.first,u)),this.vertexCount=0,h.length=0,this.flushLocked=!1,this}});t.exports=u},function(t,e,i){var n={};t.exports=n;var s=i(99),r=i(38);n.fromVertices=function(t){for(var e={},i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Bounce:i(1394),Collision:i(1395),Force:i(1396),Friction:i(1397),Gravity:i(1398),Mass:i(1399),Static:i(1400),Sensor:i(1401),SetBody:i(1402),Sleep:i(1403),Transform:i(1420),Velocity:i(1421)}},function(t,e,i){var n={};t.exports=n;var s=i(515),r=i(472),o=i(100);n.collisions=function(t,e){for(var i=[],a=e.pairs.table,h=e.metrics,l=0;l1?1:0;d1?1:0;p0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n={};t.exports=n;var s=i(86),r=i(99);n.collides=function(t,e,i){var o,a,h,l,u=!1;if(i){var c=t.parent,d=e.parent,f=c.speed*c.speed+c.angularSpeed*c.angularSpeed+d.speed*d.speed+d.angularSpeed*d.angularSpeed;u=i&&i.collided&&f<.2,l=i}else l={collided:!1,bodyA:t,bodyB:e};if(i&&u){var p=l.axisBody,g=p===t?e:t,v=[p.axes[i.axisNumber]];if(h=n._overlapAxes(p.vertices,g.vertices,v),l.reused=!0,h.overlap<=0)return l.collided=!1,l}else{if((o=n._overlapAxes(t.vertices,e.vertices,t.axes)).overlap<=0)return l.collided=!1,l;if((a=n._overlapAxes(e.vertices,t.vertices,e.axes)).overlap<=0)return l.collided=!1,l;o.overlaps?s=a:a=0?o.index-1:u.length-1],l.x=s.x-c.x,l.y=s.y-c.y,h=-r.dot(i,l),a=s,s=u[(o.index+1)%u.length],l.x=s.x-c.x,l.y=s.y-c.y,(n=-r.dot(i,l))>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"angle",e,i,s,r)}},function(t,e){t.exports=function(t,e,i){for(var n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(255),s=i(105),r=i(2),o=i(1),a=new(i(110))({sys:{queueDepthSort:o,events:{once:o}}},0,0,1,1);t.exports=function(t,e){void 0===e&&(e={});var i=e.hasOwnProperty("width"),o=e.hasOwnProperty("height"),h=r(e,"width",-1),l=r(e,"height",-1),u=r(e,"cellWidth",1),c=r(e,"cellHeight",u),d=r(e,"position",s.TOP_LEFT),f=r(e,"x",0),p=r(e,"y",0),g=0,v=0,m=h*u,y=l*c;a.setPosition(f,p),a.setSize(u,c);for(var x=0;x * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(19),s={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,s){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(e,0,1),this._alphaBL=n(i,0,1),this._alphaBR=n(s,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=n(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=n(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=n(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=n(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=s},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="add"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="complete"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="repeat"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="restart"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="start"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pauseall"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="remove"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="resumeall"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="animationcomplete"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="animationcomplete-"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="animationrepeat-"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="animationrestart-"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="animationstart-"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="animationupdate-"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="animationrepeat"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="animationrestart"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="animationstart"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="animationupdate"},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},function(t,e){t.exports={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}}},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(11),s=i(276),r=i(3),o={prepareBoundsOutput:function(t,e){return void 0===e&&(e=!1),0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t),t},getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,s,r,o,a,h,l;if(void 0===t&&(t=new n),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),s=t.x,r=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),s=t.x,r=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,l),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,l)-t.y,t}};t.exports=o},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="blur"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="boot"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="contextlost"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="contextrestored"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="destroy"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="focus"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="hidden"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pause"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="postrender"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="poststep"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="prerender"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="prestep"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="ready"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="resume"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="step"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="visible"},function(t,e){t.exports={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(35),s=i(88),r=i(6),o=i(89),a=i(3),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:o.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=r(t,"from",0),t.to=r(t,"to",1);var h=s(t,"positionOnPath",!1);this.rotateToPath=s(t,"rotateToPath",!1),this.pathRotationOffset=r(t,"rotationOffset",0);var l=r(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.target[e.key]=e.current}),this.pathOffset||(this.pathOffset=new a(this.x,this.y)),this.pathVector||(this.pathVector=new a),this.pathDelta||(this.pathDelta=new a),this.pathDelta.reset(),this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=o.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+n(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,s=this.pathVector;if(i.copy(s).negate(),e.state===o.COMPLETE)return this.path.getPoint(1,s),i.add(s),s.add(this.pathOffset),void this.setPosition(s.x,s.y);if(e.state!==o.PLAYING_FORWARD&&e.state!==o.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),s),i.add(s),s.add(this.pathOffset);var r=this.x,a=this.y;this.setPosition(s.x,s.y);var h=this.x-r,l=this.y-a;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+n(this.pathRotationOffset))}}};t.exports=h},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){t.exports={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}}},function(t,e){t.exports={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i=function(t){return(t>>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,_isTinted:!1,tintFill:!1,clearTint:function(){return this.setTint(16777215),this._isTinted=!1,this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t),this._isTinted=!0}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t),this._isTinted=!0}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t),this._isTinted=!0}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t),this._isTinted=!0}},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this._isTinted}}};t.exports=n},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="changedata"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="changedata-"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="removedata"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="setdata"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="destroy"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="complete"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="created"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="error"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="loop"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="play"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="seeked"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="seeking"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="stop"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="timeout"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="unlocked"},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"alpha",e,i,s,r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"x",e,i,s,r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(34);t.exports=function(t,e,i,s,r,o,a){return null==i&&(i=e),n(t,"x",e,s,o,a),n(t,"y",i,r,o,a)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"y",e,i,s,r)}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var s=i,r=(n-i)/t.length,o=0;o * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(153);t.exports=function(t,e){for(var i=n(e,t.length),s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(285),s=i(286),r=i(287);t.exports=function(t,e,i){void 0===i&&(i=0);var o=n(e,!1,t.length);i>0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(288);t.exports=function(t,e,i){var s=n({x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},i),r=n({x1:e.x2,y1:e.y2,x2:e.x3,y2:e.y3},i),o=n({x1:e.x3,y1:e.y3,x2:e.x1,y2:e.y1},i);s.pop(),r.pop(),o.pop();for(var a=(s=s.concat(r,o)).length/t.length,h=0,l=0;l * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(150);t.exports=function(t,e){for(var i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(157);t.exports=function(t,e){for(var i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(154);t.exports=function(t,e){for(var i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(155);t.exports=function(t,e){for(var i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(158);t.exports=function(t,e){for(var i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"rotation",e,i,s,r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(159),s=i(53);t.exports=function(t,e,i){for(var r=e.x,o=e.y,a=0;a * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(159);t.exports=function(t,e,i,s){var r=e.x,o=e.y;if(0===s)return t;for(var a=0;a * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"scaleX",e,i,s,r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(34);t.exports=function(t,e,i,s,r,o,a){return null==i&&(i=e),n(t,"scaleX",e,s,o,a),n(t,"scaleY",i,r,o,a)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"scaleY",e,i,s,r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(25);t.exports=function(t,e,i,s,r){return n(t,"alpha",e,i,s,r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(25);t.exports=function(t,e,i,s){return n(t,"blendMode",e,0,i,s)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(25);t.exports=function(t,e,i,s,r){return n(t,"depth",e,i,s,r)}},function(t,e){t.exports=function(t,e,i){for(var n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(25);t.exports=function(t,e,i,s,r,o,a){return null==i&&(i=e),n(t,"originX",e,s,o,a),n(t,"originY",i,r,o,a)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(25);t.exports=function(t,e,i,s,r){return n(t,"rotation",e,i,s,r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(25);t.exports=function(t,e,i,s,r,o,a){return null==i&&(i=e),n(t,"scaleX",e,s,o,a),n(t,"scaleY",i,r,o,a)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(25);t.exports=function(t,e,i,s,r){return n(t,"scaleX",e,i,s,r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(25);t.exports=function(t,e,i,s,r){return n(t,"scaleY",e,i,s,r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(25);t.exports=function(t,e,i,s,r,o,a){return null==i&&(i=e),n(t,"scrollFactorX",e,s,o,a),n(t,"scrollFactorY",i,r,o,a)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(25);t.exports=function(t,e,i,s,r){return n(t,"scrollFactorX",e,i,s,r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(25);t.exports=function(t,e,i,s,r){return n(t,"scrollFactorY",e,i,s,r)}},function(t,e){t.exports=function(t,e,i,n,s){for(var r=0;r * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(25);t.exports=function(t,e,i,s){return n(t,"visible",e,0,i,s)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(25);t.exports=function(t,e,i,s,r){return n(t,"x",e,i,s,r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(25);t.exports=function(t,e,i,s,r,o,a){return null==i&&(i=e),n(t,"x",e,s,o,a),n(t,"y",i,r,o,a)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(25);t.exports=function(t,e,i,s,r){return n(t,"y",e,i,s,r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(3);t.exports=function(t,e,i,s,r){var o,a,h,l,u,c;if(void 0===s&&(s=0),void 0===r&&(r=new n),t.length>1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(114);t.exports=function(t){return n(t)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(160);t.exports=function(t,e,i,s,r){void 0===r&&(r=!1);var o,a=Math.abs(s-i)/t.length;if(r)for(o=0;o * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(161);t.exports=function(t,e,i,s,r){void 0===r&&(r=!1);var o,a=Math.abs(s-i)/t.length;if(r)for(o=0;o * @author samme * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(58);t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Animation:i(151),AnimationFrame:i(271),AnimationManager:i(289),Events:i(111)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={BaseCache:i(290),CacheManager:i(292),Events:i(291)}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="add"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="remove"},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Controls:i(642),Scene2D:i(645)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={FixedKeyControl:i(643),SmoothedKeyControl:i(644)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(6),r=new n({initialize:function(t){this.camera=s(t,"camera",null),this.left=s(t,"left",null),this.right=s(t,"right",null),this.up=s(t,"up",null),this.down=s(t,"down",null),this.zoomIn=s(t,"zoomIn",null),this.zoomOut=s(t,"zoomOut",null),this.zoomSpeed=s(t,"zoomSpeed",.01),this.speedX=0,this.speedY=0;var e=s(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=s(t,"speed.x",0),this.speedY=s(t,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this.up&&this.up.isDown?e.scrollY-=this.speedY*t|0:this.down&&this.down.isDown&&(e.scrollY+=this.speedY*t|0),this.left&&this.left.isDown?e.scrollX-=this.speedX*t|0:this.right&&this.right.isDown&&(e.scrollX+=this.speedX*t|0),this.zoomIn&&this.zoomIn.isDown?(e.zoom-=this.zoomSpeed,e.zoom<.1&&(e.zoom=.1)):this.zoomOut&&this.zoomOut.isDown&&(e.zoom+=this.zoomSpeed)}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(6),r=new n({initialize:function(t){this.camera=s(t,"camera",null),this.left=s(t,"left",null),this.right=s(t,"right",null),this.up=s(t,"up",null),this.down=s(t,"down",null),this.zoomIn=s(t,"zoomIn",null),this.zoomOut=s(t,"zoomOut",null),this.zoomSpeed=s(t,"zoomSpeed",.01),this.accelX=0,this.accelY=0;var e=s(t,"acceleration",null);"number"==typeof e?(this.accelX=e,this.accelY=e):(this.accelX=s(t,"acceleration.x",0),this.accelY=s(t,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=s(t,"drag",null);"number"==typeof i?(this.dragX=i,this.dragY=i):(this.dragX=s(t,"drag.x",0),this.dragY=s(t,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var n=s(t,"maxSpeed",null);"number"==typeof n?(this.maxSpeedX=n,this.maxSpeedY=n):(this.maxSpeedX=s(t,"maxSpeed.x",0),this.maxSpeedY=s(t,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this._speedX>0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.001&&(e.zoom=.001))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Camera:i(293),BaseCamera:i(91),CameraManager:i(701),Effects:i(301),Events:i(36)}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="cameradestroy"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="camerafadeincomplete"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="camerafadeinstart"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="camerafadeoutcomplete"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="camerafadeoutstart"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="cameraflashcomplete"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="cameraflashstart"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="camerapancomplete"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="camerapanstart"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="postrender"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="prerender"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="camerarotatecomplete"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="camerarotatestart"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="camerashakecomplete"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="camerashakestart"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="camerazoomcomplete"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="camerazoomstart"},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(19),s=i(0),r=i(36),o=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,o,a,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(19),s=i(0),r=i(36),o=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,o,a){return void 0===t&&(t=250),void 0===e&&(e=255),void 0===i&&(i=255),void 0===n&&(n=255),void 0===s&&(s=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!s&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,this.red=e,this.green=i,this.blue=n,this.alpha=1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a,this.camera.emit(r.FLASH_START,this.camera,this,t,e,i,n)),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(19),s=i(0),r=i(115),o=i(36),a=i(3),h=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new a,this.current=new a,this.destination=new a,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,a,h){void 0===i&&(i=1e3),void 0===n&&(n=r.Linear),void 0===s&&(s=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene);var l=this.camera;return!s&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(l.scrollX,l.scrollY),this.destination.set(t,e),l.getScroll(t,e,this.current),"string"==typeof n&&r.hasOwnProperty(n)?this.ease=r[n]:"function"==typeof n&&(this.ease=n),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h,this.camera.emit(o.PAN_START,this.camera,this,i,t,e)),l},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=n(this._elapsed/this.duration,0,1);this.progress=i;var s=this.camera;if(this._elapsed=1?1:1/e*(1+(e*t|0))}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(19),s=i(0),r=i(36),o=i(3),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===s&&(s=this.camera.scene),!i&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=n,this._onUpdateScope=s,this.camera.emit(r.SHAKE_START,this.camera,this,t,e)),this.camera},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ var n=i(19),s=i(0),r=i(36),o=i(115),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(t,e,i,n,s,a,h){void 0===i&&(i=1e3),void 0===n&&(n=o.Linear),void 0===s&&(s=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),void 0===e&&(e=!1),this.shortestPath=e;var l=t;t<0?(l=-1*t,this.clockwise=!1):this.clockwise=!0;var u=360*Math.PI/180;l-=Math.floor(l/u)*u;var c,d,f=this.camera;return!s&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source=f.rotation,this.destination=l,"string"==typeof n&&o.hasOwnProperty(n)?this.ease=o[n]:"function"==typeof n&&(this.ease=n),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h,this.shortestPath&&((c=this.destination>this.source?Math.abs(this.destination-this.source):Math.abs(this.destination+u)-this.source)<(d=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+u)-this.destination)?this.clockwise=!0:c>d&&(this.clockwise=!1)),this.camera.emit(r.ROTATE_START,this.camera,this,i,l)),f},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=n(this._elapsed/this.duration,0,1);this.progress=i;var s=this.camera;if(this._elapsed=u?Math.abs(l-u):Math.abs(l+h)-u,a=this.clockwise?s.rotation+o*r:s.rotation-o*r,s.rotation=a,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,a)}else s.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(19),s=i(0),r=i(115),o=i(36),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,a){void 0===e&&(e=1e3),void 0===i&&(i=r.Linear),void 0===n&&(n=!1),void 0===s&&(s=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!n&&this.isRunning||(this.isRunning=!0,this.duration=e,this.progress=0,this.source=h.zoom,this.destination=t,"string"==typeof i&&r.hasOwnProperty(i)?this.ease=r[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=s,this._onUpdateScope=a,this.camera.emit(o.ZOOM_START,this.camera,this,e,t)),h},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._elapsed * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(293),s=i(0),r=i(2),o=i(23),a=i(48),h=i(92),l=i(22),u=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,t.sys.events.once(l.BOOT,this.boot,this),t.sys.events.on(l.START,this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new n(0,0,t.scale.width,t.scale.height).setScene(this.scene),t.game.scale.on(h.RESIZE,this.onResize,this),this.systems.events.once(l.DESTROY,this.destroy,this)},start:function(){if(!this.main){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]}var e=this.systems.events;e.on(l.UPDATE,this.update,this),e.once(l.SHUTDOWN,this.shutdown,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=new n(t,e,i,s);return a.setName(o),a.setScene(this.scene),a.setRoundPixels(this.roundPixels),a.id=this.getNextID(),this.cameras.push(a),r&&(this.main=a),a},addExisting:function(t,e){return void 0===e&&(e=!1),-1===this.cameras.indexOf(t)?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var n=!1,s=0;s0&&(o.preRender(1),t.render(n,e,i,o))}},resetAll:function(){for(var t=0;t * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="enterfullscreen"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="fullscreenfailed"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="fullscreenunsupported"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="leavefullscreen"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="orientationchange"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="resize"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="boot"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="create"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="destroy"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pause"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="postupdate"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="preupdate"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="ready"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="render"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="resume"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="shutdown"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="sleep"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="start"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="transitioncomplete"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="transitioninit"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="transitionout"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="transitionstart"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="transitionwake"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="update"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="wake"},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Config:i(314),CreateRenderer:i(337),DebugHeader:i(341),Events:i(20),TimeStep:i(342),VisibilityHandler:i(344)}},function(t,e){var i,n,s=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:r}catch(t){i=r}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var h,l=[],u=!1,c=-1;function d(){u&&h&&(u=!1,h.length?l=h.concat(l):c=-1,l.length&&f())}function f(){if(!u){var t=a(d);u=!0;for(var e=l.length;e;){for(h=l,l=[];++c1)for(var i=1;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(118),s={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(s.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(s.mspointer=!0),navigator.getGamepads&&(s.gamepads=!0),"onwheel"in window||n.ie&&"WheelEvent"in window?s.wheelEvent="wheel":"onmousewheel"in window?s.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(s.wheelEvent="DOMMouseScroll"),s)},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(118),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={h264:!1,hls:!1,mp4:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264=!0,i.mp4=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hls=!0))}catch(t){}return i}()},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e="Fullscreen",n="FullScreen",s=["request"+e,"request"+n,"webkitRequest"+e,"webkitRequest"+n,"msRequest"+e,"msRequest"+n,"mozRequest"+n,"mozRequest"+e];for(t=0;t * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Between:i(317),BetweenPoints:i(734),BetweenPointsY:i(735),BetweenY:i(736),CounterClockwise:i(737),Normalize:i(318),Random:i(738),RandomDegrees:i(739),Reverse:i(740),RotateTo:i(741),ShortestBetween:i(742),Wrap:i(235),WrapDegrees:i(236)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(i-t,n-e)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(15);t.exports=function(t){return t>Math.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){ /** * @author Richard Davey * @author @samme * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(119);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){ /** * @author Richard Davey * @author @samme * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(119);t.exports=function(){return n(-180,180)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(318);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(15);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Between:i(53),BetweenPoints:i(319),BetweenPointsSquared:i(744),Chebyshev:i(745),Power:i(746),Snake:i(747),Squared:i(320)}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n}},function(t,e){t.exports=function(t,e,i,n){return Math.max(Math.abs(t-i),Math.abs(e-n))}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===s&&(s=2),Math.sqrt(Math.pow(i-t,s)+Math.pow(n-e,s))}},function(t,e){t.exports=function(t,e,i,n){return Math.abs(t-i)+Math.abs(e-n)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Back:i(302),Bounce:i(303),Circular:i(304),Cubic:i(305),Elastic:i(306),Expo:i(307),Linear:i(308),Quadratic:i(309),Quartic:i(310),Quintic:i(311),Sine:i(312),Stepped:i(313)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Ceil:i(750),Equal:i(106),Floor:i(751),GreaterThan:i(321),LessThan:i(322)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Bezier:i(753),CatmullRom:i(754),CubicBezier:i(325),Linear:i(755),QuadraticBezier:i(326),SmoothStep:i(327),SmootherStep:i(756)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(323);t.exports=function(t,e){for(var i=0,s=t.length-1,r=0;r<=s;r++)i+=Math.pow(1-e,s-r)*Math.pow(e,r)*t[r]*n(s,r);return i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(171);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return t[0]===t[i]?(e<0&&(r=Math.floor(s=i*(1+e))),n(s-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(n(-s,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(116);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(160);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={GetNext:i(328),IsSize:i(120),IsValue:i(758)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Ceil:i(329),Floor:i(93),To:i(760)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var n=0;n>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(3);t.exports=function(t,e,i,s){void 0===s&&(s=new n);var r=0,o=0;return t>0&&t<=e*i&&(r=t>e-1?t-(o=Math.floor(t/e))*e:t,s.set(r,o)),s}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(174),s=i(335),r=i(336),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="addtexture"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="onerror"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="onload"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="ready"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="removetexture"},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," float alpha = mainColor.a;",""," if (!uInvertMaskAlpha)"," {"," alpha *= (maskColor.a);"," }"," else"," {"," alpha *= (1.0 - maskColor.a);"," }",""," gl_FragColor = vec4(mainColor.rgb * alpha, alpha);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","","varying vec2 outTexCoord;","varying vec4 outTint;","","void main()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","","}",""].join("\n")},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={GenerateTexture:i(345),Palettes:i(789)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={ARNE16:i(346),C64:i(790),CGA:i(791),JMP:i(792),MSX:i(793)}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Path:i(795),CubicBezier:i(347),Curve:i(81),Ellipse:i(348),Line:i(349),QuadraticBezier:i(350),Spline:i(351)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(347),r=i(348),o=i(5),a=i(349),h=i(796),l=i(350),u=i(11),c=i(351),d=i(3),f=i(15),p=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,n,r,o){var a,h,l,u=this.getEndPoint();return t instanceof d?(a=t,h=e,l=i):(a=new d(i,n),h=new d(r,o),l=new d(t,e)),this.add(new s(u,a,h,l))},quadraticBezierTo:function(t,e,i,n){var s,r,o=this.getEndPoint();return t instanceof d?(s=t,r=e):(s=new d(i,n),r=new d(t,e)),this.add(new l(o,s,r))},draw:function(t,e){for(var i=0;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},getTangent:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}s++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(3),r=new n({initialize:function(t,e){this.active=!1,this.p0=new s(t,e)},getPoint:function(t,e){return void 0===e&&(e=new s),e.copy(this.p0)},getPointAt:function(t,e){return this.getPoint(t,e)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={DataManager:i(113),DataManagerPlugin:i(798),Events:i(284)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(113),r=i(23),o=i(22),a=new n({Extends:s,initialize:function(t){s.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){s.prototype.destroy.call(this),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});r.register("DataManagerPlugin",a,"data"),t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Align:i(800),BaseShader:i(352),Bounds:i(803),Canvas:i(806),Color:i(353),Masks:i(815)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(105),s=i(18),r={In:i(801),To:i(802)};r=s(!1,r,n),t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={BottomCenter:i(256),BottomLeft:i(257),BottomRight:i(258),Center:i(259),LeftCenter:i(261),QuickSet:i(255),RightCenter:i(262),TopCenter:i(263),TopLeft:i(264),TopRight:i(265)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={BottomCenter:i(243),BottomLeft:i(244),BottomRight:i(245),LeftBottom:i(246),LeftCenter:i(247),LeftTop:i(248),QuickSet:i(242),RightBottom:i(249),RightCenter:i(250),RightTop:i(251),TopCenter:i(252),TopLeft:i(253),TopRight:i(254)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={CenterOn:i(260),GetBottom:i(39),GetCenterX:i(76),GetCenterY:i(78),GetLeft:i(41),GetOffsetX:i(804),GetOffsetY:i(805),GetRight:i(43),GetTop:i(46),SetBottom:i(45),SetCenterX:i(77),SetCenterY:i(79),SetLeft:i(42),SetRight:i(44),SetTop:i(40)}},function(t,e){t.exports=function(t){return t.width*t.originX}},function(t,e){t.exports=function(t){return t.height*t.originY}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={CanvasInterpolation:i(338),CanvasPool:i(26),Smoothing:i(167),TouchAction:i(807),UserSelect:i(808)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e="none"),t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e="none"),["-webkit-","-khtml-","-moz-","-ms-",""].forEach((function(i){t.style[i+"user-select"]=e})),t.style["-webkit-touch-callout"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t}},function(t,e){t.exports=function(t){var e={r:t>>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(31),s=i(355);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=s(l,h,t+1/3),o=s(l,h,t),a=s(l,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(166);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(116),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,s,l),g:n(e,r,l),b:n(i,o,l)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(172),s=i(31);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(354);t.exports=function(t,e,i,s,r){return void 0===s&&(s=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+n(s)+n(t)+n(e)+n(i)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={BitmapMask:i(278),GeometryMask:i(279)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n={AddToDOM:i(122),DOMContentLoaded:i(356),GetScreenOrientation:i(357),GetTarget:i(362),ParseXML:i(363),RemoveFromDOM:i(178),RequestAnimationFrame:i(343)};t.exports=n},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={EventEmitter:i(818)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(10),r=i(23),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(122),s=i(289),r=i(292),o=i(26),a=i(0),h=i(314),l=i(820),u=i(337),c=i(113),d=i(341),f=i(315),p=i(356),g=i(10),v=i(20),m=i(364),y=i(23),x=i(369),T=i(370),w=i(372),b=i(121),E=i(375),S=i(342),_=i(344),A=i(379),C=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new g,this.anims=new s(this),this.textures=new E(this),this.cache=new r(this),this.registry=new c(this),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=A.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),n(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),_(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(122);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,n(i,e.parent)}}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="boot"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="destroy"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="dragend"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="dragenter"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="drag"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="dragleave"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="dragover"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="dragstart"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="drop"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="gameout"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="gameover"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="gameobjectdown"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="dragend"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="dragenter"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="drag"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="dragleave"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="dragover"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="dragstart"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="drop"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="gameobjectmove"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="gameobjectout"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="gameobjectover"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pointerdown"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pointermove"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pointerout"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pointerover"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pointerup"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="wheel"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="gameobjectup"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="gameobjectwheel"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="boot"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="process"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="update"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pointerdown"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pointerdownoutside"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pointermove"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pointerout"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pointerover"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pointerup"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pointerupoutside"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="wheel"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pointerlockchange"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="preupdate"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="shutdown"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="start"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="update"},function(t,e){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="addfile"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="complete"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="filecomplete"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="filecomplete-"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="loaderror"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="load"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="fileprogress"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="postprocess"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="progress"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="start"},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(2),s=i(181);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(2);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){t.exports={game:"game",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s,r=i.getElementsByTagName("SubTexture"),o=0;o * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(67);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[e].frames:i.frames,a=0;a * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(67);t.exports=function(t,e,i){if(i.frames){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);var r,o=i.frames;for(var a in o){var h=o[a];r=t.add(a,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h),h.trimmed&&r.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(r.rotated=!0,r.updateUVsInverted());var l=h.anchor||h.pivot;l&&(r.customPivot=!0,r.pivotX=l.x,r.pivotY=l.y),r.customData=n(h)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(2);t.exports=function(t,e,i,s,r,o,a){var h=n(a,"frameWidth",null),l=n(a,"frameHeight",h);if(null===h)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var u=t.source[e];t.add("__BASE",e,0,0,u.width,u.height);var c=n(a,"startFrame",0),d=n(a,"endFrame",-1),f=n(a,"margin",0),p=n(a,"spacing",0),g=Math.floor((r-f+p)/(h+p))*Math.floor((o-f+p)/(l+p));0===g&&console.warn("SpriteSheet frame dimensions will result in zero frames."),(c>g||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,m=f,y=0,x=0,T=0;Tr&&(y=w-r),b>o&&(x=b-o),t.add(T,e,i+v,s+m,h-y,l-x),(v+=h+p)+h>r&&(v=f,m+=l+p)}return t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(2);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o=t.source[0];t.add("__BASE",0,0,0,o.width,o.height);var a,h=n(i,"startFrame",0),l=n(i,"endFrame",-1),u=n(i,"margin",0),c=n(i,"spacing",0),d=e.cutX,f=e.cutY,p=e.cutWidth,g=e.cutHeight,v=e.realWidth,m=e.realHeight,y=Math.floor((v-u+c)/(s+c)),x=Math.floor((m-u+c)/(r+c)),T=y*x,w=e.x,b=s-w,E=s-(v-p-w),S=e.y,_=r-S,A=r-(m-g-S);(h>T||h<-T)&&(h=0),h<0&&(h=T+h),-1!==l&&(T=h+(l+1));for(var C=u,M=u,P=0,O=e.sourceIndex,R=0;R * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i=0,n=function(t,e,n,s){var r=i-s.y-s.height;t.add(n,e,s.x,r,s.width,s.height)};t.exports=function(t,e,s){var r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height),i=r.height;for(var o=s.split("\n"),a=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",l="",u={x:0,y:0,width:0,height:0},c=0;c * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="complete"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="decoded"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="decodedall"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="destroy"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="detune"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="detune"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="mute"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="rate"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="volume"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="loop"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="looped"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="mute"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pauseall"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pause"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="play"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="rate"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="resumeall"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="resume"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="seek"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="stopall"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="stop"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="unlocked"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="volume"},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n={Events:i(90),DisplayList:i(913),GameObjectCreator:i(16),GameObjectFactory:i(5),UpdateList:i(939),Components:i(12),BuildGameObject:i(27),BuildGameObjectAnimation:i(392),GameObject:i(13),BitmapText:i(132),Blitter:i(188),Container:i(189),DOMElement:i(394),DynamicBitmapText:i(190),Extern:i(396),Graphics:i(191),Group:i(97),Image:i(107),Particles:i(971),PathFollower:i(408),RenderTexture:i(195),RetroFont:i(980),Rope:i(197),Sprite:i(75),Text:i(198),TileSprite:i(199),Zone:i(110),Video:i(200),Shape:i(30),Arc:i(409),Curve:i(410),Ellipse:i(411),Grid:i(412),IsoBox:i(413),IsoTriangle:i(414),Line:i(415),Polygon:i(416),Rectangle:i(421),Star:i(422),Triangle:i(423),Factories:{Blitter:i(1031),Container:i(1032),DOMElement:i(1033),DynamicBitmapText:i(1034),Extern:i(1035),Graphics:i(1036),Group:i(1037),Image:i(1038),Particles:i(1039),PathFollower:i(1040),RenderTexture:i(1041),Rope:i(1042),Sprite:i(1043),StaticBitmapText:i(1044),Text:i(1045),TileSprite:i(1046),Zone:i(1047),Video:i(1048),Arc:i(1049),Curve:i(1050),Ellipse:i(1051),Grid:i(1052),IsoBox:i(1053),IsoTriangle:i(1054),Line:i(1055),Polygon:i(1056),Rectangle:i(1057),Star:i(1058),Triangle:i(1059)},Creators:{Blitter:i(1060),Container:i(1061),DynamicBitmapText:i(1062),Graphics:i(1063),Group:i(1064),Image:i(1065),Particles:i(1066),RenderTexture:i(1067),Rope:i(1068),Sprite:i(1069),StaticBitmapText:i(1070),Text:i(1071),TileSprite:i(1072),Zone:i(1073),Video:i(1074)}};n.Mesh=i(134),n.Quad=i(203),n.Shader=i(204),n.Factories.Mesh=i(1081),n.Factories.Quad=i(1082),n.Factories.Shader=i(1083),n.Creators.Mesh=i(1084),n.Creators.Quad=i(1085),n.Creators.Shader=i(1086),n.Light=i(427),i(428),i(1087),t.exports=n},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(129),r=i(23),o=i(22),a=i(131),h=new n({Extends:s,initialize:function(t){s.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(o.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(a.inplace(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},shutdown:function(){for(var t=this.list.length;t--;)this.list[t].destroy(!0);this.list.length=0,this.systems.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});r.register("DisplayList",h,"displayList"),t.exports=h},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={CheckMatrix:i(184),MatrixToString:i(915),ReverseColumns:i(916),ReverseRows:i(917),Rotate180:i(918),RotateLeft:i(919),RotateMatrix:i(130),RotateRight:i(920),TransposeMatrix:i(389)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(163),s=i(184);t.exports=function(t){var e="";if(!s(t))return e;for(var i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(130);t.exports=function(t){return n(t,180)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(130);t.exports=function(t){return n(t,90)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(130);t.exports=function(t){return n(t,-90)}},function(t,e){t.exports=function(t,e,i,n,s){if(void 0===s&&(s=t),i>0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(s,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a0){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;n>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),s&&s.call(r,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(68);t.exports=function(t,e,i,s,r){void 0===s&&(s=0),void 0===r&&(r=t.length);var o=0;if(n(t,s,r))for(var a=s;a * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r)){var o,a=[null];for(o=5;o0){var n=t[i-1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(331);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var s=[],r=Math.max(n((e-t)/(i||1)),0),o=0;o * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(80);t.exports=function(t,e,i,s){if(void 0===s&&(s=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var r=n(t,e);return i&&i.call(s,r),r}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),n(t,e,i)){var o=i-e,a=t.splice(e,o);if(s)for(var h=0;h * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(80);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return n(t,s)}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e),s=t.indexOf(i);return-1!==n&&-1===s&&(t[n]=i,!0)}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r))for(var o=s;o * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(186),r=i(23),o=i(22),a=new n({Extends:s,initialize:function(t){s.call(this),this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(o.PRE_UPDATE,this.update,this),t.on(o.UPDATE,this.sceneUpdate,this),t.once(o.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(t,e){for(var i=this._active,n=i.length,s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={PROCESS_QUEUE_ADD:i(941),PROCESS_QUEUE_REMOVE:i(942)}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="add"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="remove"},function(t,e){t.exports=function(t,e,i){if(void 0===i)return{local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],scaleX:0,scaleY:0};var n,s,r,o=t.text,a=o.length,h=t.maxWidth,l=t.wordWrapCharCode,u=Number.MAX_VALUE,c=Number.MAX_VALUE,d=0,f=0,p=t.fontData.chars,g=t.fontData.lineHeight,v=t.letterSpacing,m=0,y=0,x=0,T=null,w=0,b=0,E=t.fontSize/t.fontData.size,S=E*t.scaleX,_=E*t.scaleY,A=null,C=0,M=[],P=Number.MAX_VALUE,O=0,R=0,L=0,D=[],k=null;if(h>0){for(n=0;nh||U-B>h?(N.push(Y.i-1),Y.cr?(N.push(Y.i+Y.word.length),B=0,I=null):I=Y):Y.cr&&(N.push(Y.i+Y.word.length),B=0,I=null)}for(n=N.length-1;n>=0;n--)s=o,r=N[n],o=s.substr(0,r)+"\n"+s.substr(r+1);i.wrappedText=o,a=o.length,D=[],k=null}for(n=0;nw&&(u=w),c>b&&(c=b);var G=w+T.xAdvance,W=b+g;dO&&(O=L),LO&&(O=L),L * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(187);t.exports=function(t,e,i,s,r,o,a){var h=t.sys.textures.getFrame(i,s),l=t.sys.cache.xml.get(r);if(h&&l){var u=n(l,o,a,h);return t.sys.cache.bitmapFont.add(e,{data:u,texture:i,frame:s}),!0}return!1}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(946),s=i(947),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(9);t.exports=function(t,e,i,s,r){var o=e._text,a=o.length;if(0!==a){var h=this.pipeline;t.setPipeline(h,e);var l=h._tempMatrix1,u=h._tempMatrix2,c=h._tempMatrix3;u.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),l.copyFrom(s.matrix),r?(l.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),u.e=e.x,u.f=e.y,l.multiply(u,c)):(u.e-=s.scrollX*e.scrollFactorX,u.f-=s.scrollY*e.scrollFactorY,l.multiply(u,c));var d=e.frame,f=d.glTexture,p=d.cutX,g=d.cutY,v=f.width,m=f.height,y=e._isTinted&&e.tintFill,x=n.getTintAppendFloatAlpha(e._tintTL,s.alpha*e._alphaTL),T=n.getTintAppendFloatAlpha(e._tintTR,s.alpha*e._alphaTR),w=n.getTintAppendFloatAlpha(e._tintBL,s.alpha*e._alphaBL),b=n.getTintAppendFloatAlpha(e._tintBR,s.alpha*e._alphaBR);h.setTexture2D(f,0);var E,S,_=0,A=0,C=0,M=0,P=e._letterSpacing,O=0,R=0,L=0,D=0,k=e.fontData,F=k.chars,I=k.lineHeight,B=e._fontSize/k.size,N=e._align,Y=0,X=0,U=e.getTextBounds(!1);e.maxWidth>0&&(a=(o=U.wrappedText).length);var z=e._bounds.lines;1===N?X=(z.longest-z.lengths[0])/2:2===N&&(X=z.longest-z.lengths[0]);for(var G=s.roundPixels,W=0;W * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(28);t.exports=function(t,e,i,s,r){var o=e._text,a=o.length,h=t.currentContext;if(0!==a&&n(t,h,e,s,r)){var l=e.frame,u=e.fontData.chars,c=e.fontData.lineHeight,d=e._letterSpacing,f=0,p=0,g=0,v=null,m=0,y=0,x=0,T=0,w=0,b=0,E=null,S=0,_=e.frame.source.image,A=l.cutX,C=l.cutY,M=e._fontSize/e.fontData.size,P=e._align,O=0,R=0,L=e.getTextBounds(!1);e.maxWidth>0&&(a=(o=L.wrappedText).length);var D=e._bounds.lines;1===P?R=(D.longest-D.lengths[0])/2:2===P&&(R=D.longest-D.lengths[0]),h.translate(-e.displayOriginX,-e.displayOriginY);for(var k=s.roundPixels,F=0;F * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(949),s=i(950),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(9);t.exports=function(t,e,i,s,r){var o=e.getRenderList();if(0!==o.length){var a=this.pipeline;t.setPipeline(a,e);var h=s.scrollX*e.scrollFactorX,l=s.scrollY*e.scrollFactorY,u=a._tempMatrix1;u.copyFrom(s.matrix),r&&(u.multiplyWithOffset(r,-h,-l),h=0,l=0);for(var c=e.x-h,d=e.y-l,f=-1,p=s.alpha*e.alpha,g=s.roundPixels,v=0;v * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(94),r=new n({initialize:function(t,e,i,n,s){this.parent=t,this.x=e,this.y=i,this.frame=n,this.data={},this.tint=16777215,this._visible=s,this._alpha=1,this.flipX=!1,this.flipY=!1},setFrame:function(t){return void 0===t?this.frame=this.parent.frame:t instanceof s&&t.texture===this.parent.texture?this.frame=t:this.frame=this.parent.texture.get(t),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(t,e,i){return this.x=t,this.y=e,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,i&&this.setFrame(i),this},setPosition:function(t,e){return this.x=t,this.y=e,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},setVisible:function(t){return this.visible=t,this},setAlpha:function(t){return this.alpha=t,this},setTint:function(t){return this.tint=t,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(t){this.parent.dirty|=this._visible!==t,this._visible=t}},alpha:{get:function(){return this._alpha},set:function(t){this.parent.dirty|=this._alpha>0!=t>0,this._alpha=t}}});t.exports=r},function(t,e,i){ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(953),s=i(954),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){var r=e.list;if(0!==r.length){var o=e.localTransform;s?(o.loadIdentity(),o.multiply(s),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=r,d=r.length,f=0;f * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(395),s=i(395),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(958),s=i(959),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(9);t.exports=function(t,e,i,s,r){var o=e.text,a=o.length;if(0!==a){var h=this.pipeline;t.setPipeline(h,e);var l=e.cropWidth>0||e.cropHeight>0;l&&(h.flush(),t.pushScissor(e.x,e.y,e.cropWidth*e.scaleX,e.cropHeight*e.scaleY));var u=h._tempMatrix1,c=h._tempMatrix2,d=h._tempMatrix3,f=h._tempMatrix4;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),u.copyFrom(s.matrix),r?(u.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,u.multiply(c,d)):(c.e-=s.scrollX*e.scrollFactorX,c.f-=s.scrollY*e.scrollFactorY,u.multiply(c,d));var p=e.frame,g=p.glTexture,v=p.cutX,m=p.cutY,y=g.width,x=g.height,T=e._isTinted&&e.tintFill,w=n.getTintAppendFloatAlpha(e._tintTL,s.alpha*e._alphaTL),b=n.getTintAppendFloatAlpha(e._tintTR,s.alpha*e._alphaTR),E=n.getTintAppendFloatAlpha(e._tintBL,s.alpha*e._alphaBL),S=n.getTintAppendFloatAlpha(e._tintBR,s.alpha*e._alphaBR);h.setTexture2D(g,0);var _,A,C=0,M=0,P=0,O=0,R=e.letterSpacing,L=0,D=0,k=0,F=0,I=e.scrollX,B=e.scrollY,N=e.fontData,Y=N.chars,X=N.lineHeight,U=e.fontSize/N.size,z=0,G=e._align,W=0,V=0;e.getTextBounds(!1);var H=e._bounds.lines;1===G?V=(H.longest-H.lengths[0])/2:2===G&&(V=H.longest-H.lengths[0]);for(var j=s.roundPixels,q=e.displayCallback,K=e.callbackData,J=0;J * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(28);t.exports=function(t,e,i,s,r){var o=e._text,a=o.length,h=t.currentContext;if(0!==a&&n(t,h,e,s,r)){var l=e.frame,u=e.displayCallback,c=e.callbackData,d=e.fontData.chars,f=e.fontData.lineHeight,p=e._letterSpacing,g=0,v=0,m=0,y=null,x=0,T=0,w=0,b=0,E=0,S=0,_=null,A=0,C=e.frame.source.image,M=l.cutX,P=l.cutY,O=0,R=0,L=e._fontSize/e.fontData.size,D=e._align,k=0,F=0;e.getTextBounds(!1);var I=e._bounds.lines;1===D?F=(I.longest-I.lengths[0])/2:2===D&&(F=I.longest-I.lengths[0]),h.translate(-e.displayOriginX,-e.displayOriginY);var B=s.roundPixels;e.cropWidth>0&&e.cropHeight>0&&(h.beginPath(),h.rect(0,0,e.cropWidth,e.cropHeight),h.clip());for(var N=0;N * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(961),s=i(962),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){var r=t.currentPipeline;t.clearPipeline();var o=t._tempMatrix1,a=t._tempMatrix2,h=t._tempMatrix3;a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),o.copyFrom(n.matrix),s?(o.multiplyWithOffset(s,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),a.e=e.x,a.f=e.y,o.multiply(a,h)):(a.e-=n.scrollX*e.scrollFactorX,a.f-=n.scrollY*e.scrollFactorY,o.multiply(a,h)),e.render.call(e,t,n,h),t.rebindPipeline(r)}},function(t,e){},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(964),i(400),s=i(400),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(192),s=i(9),r=function(t,e,i){this.x=t,this.y=e,this.width=i},o=function(t,e,i){this.points=[],this.pointsLength=1,this.points[0]=new r(t,e,i)},a=[];t.exports=function(t,e,i,h,l){if(0!==e.commandBuffer.length){var u=this.pipeline;t.setPipeline(u,e);var c=e._tempMatrix1,d=e._tempMatrix2,f=e._tempMatrix3;f.loadIdentity(),d.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),c.copyFrom(h.matrix),l?(c.multiplyWithOffset(l,-h.scrollX*e.scrollFactorX,-h.scrollY*e.scrollFactorY),d.e=e.x,d.f=e.y,c.multiply(d)):(d.e-=h.scrollX*e.scrollFactorX,d.f-=h.scrollY*e.scrollFactorY,c.multiply(d));for(var p=e.commandBuffer,g=h.alpha*e.alpha,v=1,m=u.fillTint,y=u.strokeTint,x=0,T=0,w=0,b=2*Math.PI,E=[],S=0,_=!1,A=null,C=s.getTintAppendFloatAlphaAndSwap,M=t.blankTexture.glTexture,P=0;P0&&(Y=Y%b-b):Y>b?Y=b:Y<0&&(Y=b+Y%b),null===A&&(A=new o(F+Math.cos(N)*B,I+Math.sin(N)*B,v),E.push(A),k+=.01);k<1+U;)w=Y*k+N,x=F+Math.cos(w)*B,T=I+Math.sin(w)*B,A.points.push(new r(x,T,v)),k+=.01;w=Y+N,x=F+Math.cos(w)*B,T=I+Math.sin(w)*B,A.points.push(new r(x,T,v));break;case n.FILL_RECT:u.setTexture2D(M),u.batchFillRect(p[++P],p[++P],p[++P],p[++P],f,c);break;case n.FILL_TRIANGLE:u.setTexture2D(M),u.batchFillTriangle(p[++P],p[++P],p[++P],p[++P],p[++P],p[++P],f,c);break;case n.STROKE_TRIANGLE:u.setTexture2D(M),u.batchStrokeTriangle(p[++P],p[++P],p[++P],p[++P],p[++P],p[++P],v,f,c);break;case n.LINE_TO:null!==A?A.points.push(new r(p[++P],p[++P],v)):(A=new o(p[++P],p[++P],v),E.push(A));break;case n.MOVE_TO:A=new o(p[++P],p[++P],v),E.push(A);break;case n.SAVE:a.push(f.copyToArray());break;case n.RESTORE:f.copyFromArray(a.pop());break;case n.TRANSLATE:F=p[++P],I=p[++P],f.translate(F,I);break;case n.SCALE:F=p[++P],I=p[++P],f.scale(F,I);break;case n.ROTATE:f.rotate(p[++P]);break;case n.SET_TEXTURE:var z=p[++P],G=p[++P];u.currentFrame=z,u.setTexture2D(z.glTexture,0),u.tintEffect=G,M=z.glTexture;break;case n.CLEAR_TEXTURE:u.currentFrame=t.blankTexture,u.tintEffect=2,M=t.blankTexture.glTexture}}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(966),s=i(967),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(969),s=i(970),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={GravityWell:i(401),Particle:i(402),ParticleEmitter:i(403),ParticleEmitterManager:i(194),Zones:i(976)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(119),r=i(69),o=i(2),a=i(58),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||!!t.random;if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(974),s=i(975),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(9);t.exports=function(t,e,i,s,r){var o=e.emitters.list,a=o.length;if(0!==a){var h=this.pipeline,l=h._tempMatrix1.copyFrom(s.matrix),u=h._tempMatrix2,c=h._tempMatrix3,d=h._tempMatrix4.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);l.multiply(d),t.setPipeline(h);var f=s.roundPixels,p=e.defaultFrame.glTexture,g=n.getTintAppendFloatAlphaAndSwap;h.setTexture2D(p,0);for(var v=0;v * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={DeathZone:i(404),EdgeZone:i(405),RandomZone:i(407)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(978),s=i(979),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(9);t.exports=function(t,e,i,s,r){var o=e.frame,a=o.width,h=o.height,l=n.getTintAppendFloatAlpha;this.pipeline.batchTexture(e,o.glTexture,a,h,e.x,e.y,a,h,e.scaleX,e.scaleY,e.rotation,e.flipX,!e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,a,h,l(e._tintTL,s.alpha*e._alphaTL),l(e._tintTR,s.alpha*e._alphaTR),l(e._tintBL,s.alpha*e._alphaBL),l(e._tintBR,s.alpha*e._alphaBR),e._isTinted&&e.tintFill,0,0,s,r),t.setBlankTexture(!0)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(981),s=i(18),r={Parse:i(982)};r=s(!1,r,n),t.exports=r},function(t,e){t.exports={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(6);t.exports=function(t,e){var i=e.width,s=e.height,r=Math.floor(i/2),o=Math.floor(s/2),a=n(e,"chars","");if(""!==a){var h=n(e,"image",""),l=n(e,"offset.x",0),u=n(e,"offset.y",0),c=n(e,"spacing.x",0),d=n(e,"spacing.y",0),f=n(e,"lineSpacing",0),p=n(e,"charsPerRow",null);null===p&&(p=t.sys.textures.getFrame(h).width/i)>a.length&&(p=a.length);for(var g=l,v=u,m={retroFont:!0,font:h,size:i,lineHeight:s+f,chars:{}},y=0,x=0;x * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(984),s=i(985),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(9);t.exports=function(t,e,i,s,r){var o=e.pipeline;t.setPipeline(o,e);var a=o._tempMatrix1,h=o._tempMatrix2,l=o._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(s.matrix),r?(a.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l)):(h.e-=s.scrollX*e.scrollFactorX,h.f-=s.scrollY*e.scrollFactorY,a.multiply(h,l));var u=e.frame.glTexture,c=e.vertices,d=e.uv,f=e.colors,p=e.alphas,g=e.alpha,v=n.getTintAppendFloatAlphaAndSwap,m=s.roundPixels,y=c.length,x=Math.floor(.5*y);o.flush(),o.setTexture2D(u,0);var T=o.vertexViewF32,w=o.vertexViewU32,b=o.vertexCount*o.vertexComponentCount-1,E=0,S=e.tintFill;e.dirty&&e.updateVertices();for(var _=e.debugCallback,A=[],C=0;C0&&r.maxLines1&&(d+=f*(h-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(988),s=i(989),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(9);t.exports=function(t,e,i,s,r){if(0!==e.width&&0!==e.height){var o=e.frame,a=o.width,h=o.height,l=n.getTintAppendFloatAlpha;this.pipeline.batchTexture(e,o.glTexture,a,h,e.x,e.y,a/e.style.resolution,h/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,a,h,l(e._tintTL,s.alpha*e._alphaTL),l(e._tintTR,s.alpha*e._alphaTR),l(e._tintBL,s.alpha*e._alphaBL),l(e._tintBR,s.alpha*e._alphaBR),e._isTinted&&e.tintFill,0,0,s,r)}}},function(t,e){t.exports=function(t,e,i,n,s){0!==e.width&&0!==e.height&&t.batchSprite(e,e.frame,n,s)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(14),r=i(6),o=i(991),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this._font,this.setStyle(e,!1,!0);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e,i){for(var n in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a){var o=i?a[n][1]:this[n];this[n]="wordWrapCallback"===n||"wordWrapCallbackScope"===n?r(t,a[n][0],o):s(t,a[n][0],o)}var h=r(t,"font",null);null!==h&&this.setFont(h,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var l=r(t,"fill",null);return null!==l&&(this.color=l),e?this.update(!0):this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,n="",s="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),n=r(t,"fontSize","16px"),s=r(t,"fontStyle","");else{var o=t.split(" "),a=0;s=o.length>2?o[a++]:"",n=o[a++]||"16px",i=o[a++]||"Courier"}return i===this.fontFamily&&n===this.fontSize&&s===this.fontStyle||(this.fontFamily=i,this.fontSize=n,this.fontStyle=s,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(26);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(i.measureText(t.testString).width*t.baselineX),r=s,o=2*r;r=r*t.baselineY|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,l,u=i.getImageData(0,0,s,o).data,c=u.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(l=0;l * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(993),s=i(994),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(9);t.exports=function(t,e,i,s,r){e.updateCanvas();var o=n.getTintAppendFloatAlpha;this.pipeline.batchTexture(e,e.fillPattern,e.displayFrame.width*e.tileScaleX,e.displayFrame.height*e.tileScaleY,e.x,e.y,e.width,e.height,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.originX*e.width,e.originY*e.height,0,0,e.width,e.height,o(e._tintTL,s.alpha*e._alphaTL),o(e._tintTR,s.alpha*e._alphaTR),o(e._tintBL,s.alpha*e._alphaBL),o(e._tintBR,s.alpha*e._alphaBR),e._isTinted&&e.tintFill,e.tilePositionX%e.displayFrame.width/e.displayFrame.width,e.tilePositionY%e.displayFrame.height/e.displayFrame.height,s,r)}},function(t,e){t.exports=function(t,e,i,n,s){e.updateCanvas(),t.batchSprite(e,e.frame,n,s)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(996),s=i(997),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){e.videoTexture&&this.pipeline.batchSprite(e,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){e.videoTexture&&t.batchSprite(e,e.frame,n,s)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(999),s=i(1e3),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(98),s=i(70);t.exports=function(t,e,i,r,o){var a=this.pipeline,h=a._tempMatrix1,l=a._tempMatrix2,u=a._tempMatrix3;t.setPipeline(a),l.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),h.copyFrom(r.matrix),o?(h.multiplyWithOffset(o,-r.scrollX*e.scrollFactorX,-r.scrollY*e.scrollFactorY),l.e=e.x,l.f=e.y):(l.e-=r.scrollX*e.scrollFactorX,l.f-=r.scrollY*e.scrollFactorY),h.multiply(l,u);var c=e._displayOriginX,d=e._displayOriginY,f=r.alpha*e.alpha;e.isFilled&&n(a,u,e,f,c,d),e.isStroked&&s(a,e,f,c,d)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(35),s=i(37),r=i(49),o=i(28);t.exports=function(t,e,i,a,h){var l=t.currentContext;if(o(t,l,e,a,h)){var u=e.radius;l.beginPath(),l.arc(u-e.originX*(2*u),u-e.originY*(2*u),u,n(e._startAngle),n(e._endAngle),e.anticlockwise),e.closePath&&l.closePath(),e.isFilled&&(s(l,e),l.fill()),e.isStroked&&(r(l,e),l.stroke()),l.restore()}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(1002),s=i(1003),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(98),s=i(70);t.exports=function(t,e,i,r,o){var a=this.pipeline,h=a._tempMatrix1,l=a._tempMatrix2,u=a._tempMatrix3;t.setPipeline(a),l.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),h.copyFrom(r.matrix),o?(h.multiplyWithOffset(o,-r.scrollX*e.scrollFactorX,-r.scrollY*e.scrollFactorY),l.e=e.x,l.f=e.y):(l.e-=r.scrollX*e.scrollFactorX,l.f-=r.scrollY*e.scrollFactorY),h.multiply(l,u);var c=e._displayOriginX+e._curveBounds.x,d=e._displayOriginY+e._curveBounds.y,f=r.alpha*e.alpha;e.isFilled&&n(a,u,e,f,c,d),e.isStroked&&s(a,e,f,c,d)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(37),s=i(49),r=i(28);t.exports=function(t,e,i,o,a){var h=t.currentContext;if(r(t,h,e,o,a)){var l=e._displayOriginX+e._curveBounds.x,u=e._displayOriginY+e._curveBounds.y,c=e.pathData,d=c.length-1,f=c[0]-l,p=c[1]-u;h.beginPath(),h.moveTo(f,p),e.closePath||(d-=2);for(var g=2;g * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(1005),s=i(1006),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(98),s=i(70);t.exports=function(t,e,i,r,o){var a=this.pipeline,h=a._tempMatrix1,l=a._tempMatrix2,u=a._tempMatrix3;t.setPipeline(a),l.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),h.copyFrom(r.matrix),o?(h.multiplyWithOffset(o,-r.scrollX*e.scrollFactorX,-r.scrollY*e.scrollFactorY),l.e=e.x,l.f=e.y):(l.e-=r.scrollX*e.scrollFactorX,l.f-=r.scrollY*e.scrollFactorY),h.multiply(l,u);var c=e._displayOriginX,d=e._displayOriginY,f=r.alpha*e.alpha;e.isFilled&&n(a,u,e,f,c,d),e.isStroked&&s(a,e,f,c,d)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(37),s=i(49),r=i(28);t.exports=function(t,e,i,o,a){var h=t.currentContext;if(r(t,h,e,o,a)){var l=e._displayOriginX,u=e._displayOriginY,c=e.pathData,d=c.length-1,f=c[0]-l,p=c[1]-u;h.beginPath(),h.moveTo(f,p),e.closePath||(d-=2);for(var g=2;g * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(1008),s=i(1009),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(9);t.exports=function(t,e,i,s,r){var o=this.pipeline,a=o._tempMatrix1,h=o._tempMatrix2,l=o._tempMatrix3;t.setPipeline(o),h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(s.matrix),r?(a.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y):(h.e-=s.scrollX*e.scrollFactorX,h.f-=s.scrollY*e.scrollFactorY),a.multiply(h,l),l.translate(-e._displayOriginX,-e._displayOriginY);var u,c,d=s.alpha*e.alpha,f=e.width,p=e.height,g=e.cellWidth,v=e.cellHeight,m=Math.ceil(f/g),y=Math.ceil(p/v),x=g,T=v,w=g-(m*g-f),b=v-(y*v-p),E=e.showCells,S=e.showAltCells,_=e.showOutline,A=0,C=0,M=0,P=0,O=0;if(_&&(x--,T--,w===g&&w--,b===v&&b--),E&&e.fillAlpha>0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.fillColor,e.fillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.altFillColor,e.altFillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C0){var R=o.strokeTint,L=n.getTintAppendFloatAlphaAndSwap(e.outlineFillColor,e.outlineFillAlpha*d);for(R.TL=L,R.TR=L,R.BL=L,R.BR=L,A=1;A * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(37),s=i(49),r=i(28);t.exports=function(t,e,i,o,a){var h=t.currentContext;if(r(t,h,e,o,a)){var l=-e._displayOriginX,u=-e._displayOriginY,c=o.alpha*e.alpha,d=e.width,f=e.height,p=e.cellWidth,g=e.cellHeight,v=Math.ceil(d/p),m=Math.ceil(f/g),y=p,x=g,T=p-(v*p-d),w=g-(m*g-f),b=e.showCells,E=e.showAltCells,S=e.showOutline,_=0,A=0,C=0,M=0,P=0;if(S&&(y--,x--,T===p&&T--,w===g&&w--),b&&e.fillAlpha>0)for(n(h,e),A=0;A0)for(n(h,e,e.altFillColor,e.altFillAlpha*c),A=0;A0){for(s(h,e,e.outlineFillColor,e.outlineFillAlpha*c),_=1;_ * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(1011),s=i(1012),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(9);t.exports=function(t,e,i,s,r){var o=this.pipeline,a=o._tempMatrix1,h=o._tempMatrix2,l=o._tempMatrix3;t.setPipeline(o),h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(s.matrix),r?(a.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y):(h.e-=s.scrollX*e.scrollFactorX,h.f-=s.scrollY*e.scrollFactorY),a.multiply(h,l);var u,c,d,f,p,g,v,m,y,x=e.width,T=e.height,w=x/2,b=x/e.projection,E=s.alpha*e.alpha;e.isFilled&&(e.showTop&&(u=n.getTintAppendFloatAlphaAndSwap(e.fillTop,E),c=l.getX(-w,-T),d=l.getY(-w,-T),f=l.getX(0,-b-T),p=l.getY(0,-b-T),g=l.getX(w,-T),v=l.getY(w,-T),m=l.getX(0,b-T),y=l.getY(0,b-T),o.setTexture2D(),o.batchQuad(c,d,f,p,g,v,m,y,0,0,1,1,u,u,u,u,2)),e.showLeft&&(u=n.getTintAppendFloatAlphaAndSwap(e.fillLeft,E),c=l.getX(-w,0),d=l.getY(-w,0),f=l.getX(0,b),p=l.getY(0,b),g=l.getX(0,b-T),v=l.getY(0,b-T),m=l.getX(-w,-T),y=l.getY(-w,-T),o.setTexture2D(),o.batchQuad(c,d,f,p,g,v,m,y,0,0,1,1,u,u,u,u,2)),e.showRight&&(u=n.getTintAppendFloatAlphaAndSwap(e.fillRight,E),c=l.getX(w,0),d=l.getY(w,0),f=l.getX(0,b),p=l.getY(0,b),g=l.getX(0,b-T),v=l.getY(0,b-T),m=l.getX(w,-T),y=l.getY(w,-T),o.setTexture2D(),o.batchQuad(c,d,f,p,g,v,m,y,0,0,1,1,u,u,u,u,2)))}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(37),s=i(28);t.exports=function(t,e,i,r,o){var a=t.currentContext;if(s(t,a,e,r,o)&&e.isFilled){var h=e.width,l=e.height,u=h/2,c=h/e.projection;e.showTop&&(n(a,e,e.fillTop),a.beginPath(),a.moveTo(-u,-l),a.lineTo(0,-c-l),a.lineTo(u,-l),a.lineTo(u,-1),a.lineTo(0,c-1),a.lineTo(-u,-1),a.lineTo(-u,-l),a.fill()),e.showLeft&&(n(a,e,e.fillLeft),a.beginPath(),a.moveTo(-u,0),a.lineTo(0,c),a.lineTo(0,c-l),a.lineTo(-u,-l),a.lineTo(-u,0),a.fill()),e.showRight&&(n(a,e,e.fillRight),a.beginPath(),a.moveTo(u,0),a.lineTo(0,c),a.lineTo(0,c-l),a.lineTo(u,-l),a.lineTo(u,0),a.fill()),a.restore()}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(1014),s=i(1015),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(9);t.exports=function(t,e,i,s,r){var o=this.pipeline,a=o._tempMatrix1,h=o._tempMatrix2,l=o._tempMatrix3;t.setPipeline(o),h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(s.matrix),r?(a.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y):(h.e-=s.scrollX*e.scrollFactorX,h.f-=s.scrollY*e.scrollFactorY),a.multiply(h,l);var u=e.width,c=e.height,d=u/2,f=u/e.projection,p=e.isReversed,g=s.alpha*e.alpha;if(e.isFilled){var v,m,y,x,T,w,b;if(e.showTop&&p){v=n.getTintAppendFloatAlphaAndSwap(e.fillTop,g),m=l.getX(-d,-c),y=l.getY(-d,-c),x=l.getX(0,-f-c),T=l.getY(0,-f-c),w=l.getX(d,-c),b=l.getY(d,-c);var E=l.getX(0,f-c),S=l.getY(0,f-c);o.setTexture2D(),o.batchQuad(m,y,x,T,w,b,E,S,0,0,1,1,v,v,v,v,2)}e.showLeft&&(v=n.getTintAppendFloatAlphaAndSwap(e.fillLeft,g),p?(m=l.getX(-d,-c),y=l.getY(-d,-c),x=l.getX(0,f),T=l.getY(0,f),w=l.getX(0,f-c),b=l.getY(0,f-c)):(m=l.getX(-d,0),y=l.getY(-d,0),x=l.getX(0,f),T=l.getY(0,f),w=l.getX(0,f-c),b=l.getY(0,f-c)),o.batchTri(m,y,x,T,w,b,0,0,1,1,v,v,v,2)),e.showRight&&(v=n.getTintAppendFloatAlphaAndSwap(e.fillRight,g),p?(m=l.getX(d,-c),y=l.getY(d,-c),x=l.getX(0,f),T=l.getY(0,f),w=l.getX(0,f-c),b=l.getY(0,f-c)):(m=l.getX(d,0),y=l.getY(d,0),x=l.getX(0,f),T=l.getY(0,f),w=l.getX(0,f-c),b=l.getY(0,f-c)),o.setTexture2D(),o.batchTri(m,y,x,T,w,b,0,0,1,1,v,v,v,2))}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(37),s=i(28);t.exports=function(t,e,i,r,o){var a=t.currentContext;if(s(t,a,e,r,o)&&e.isFilled){var h=e.width,l=e.height,u=h/2,c=h/e.projection,d=e.isReversed;e.showTop&&d&&(n(a,e,e.fillTop),a.beginPath(),a.moveTo(-u,-l),a.lineTo(0,-c-l),a.lineTo(u,-l),a.lineTo(0,c-l),a.fill()),e.showLeft&&(n(a,e,e.fillLeft),a.beginPath(),d?(a.moveTo(-u,-l),a.lineTo(0,c),a.lineTo(0,c-l)):(a.moveTo(-u,0),a.lineTo(0,c),a.lineTo(0,c-l)),a.fill()),e.showRight&&(n(a,e,e.fillRight),a.beginPath(),d?(a.moveTo(u,-l),a.lineTo(0,c),a.lineTo(0,c-l)):(a.moveTo(u,0),a.lineTo(0,c),a.lineTo(0,c-l)),a.fill()),a.restore()}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(1017),s=i(1018),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(9);t.exports=function(t,e,i,s,r){var o=this.pipeline,a=o._tempMatrix1,h=o._tempMatrix2;t.setPipeline(o),h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(s.matrix),r?(a.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y):(h.e-=s.scrollX*e.scrollFactorX,h.f-=s.scrollY*e.scrollFactorY);var l=e._displayOriginX,u=e._displayOriginY,c=s.alpha*e.alpha;if(e.isStroked){var d=o.strokeTint,f=n.getTintAppendFloatAlphaAndSwap(e.strokeColor,e.strokeAlpha*c);d.TL=f,d.TR=f,d.BL=f,d.BR=f;var p=e._startWidth,g=e._endWidth;o.setTexture2D(),o.batchLine(e.geom.x1-l,e.geom.y1-u,e.geom.x2-l,e.geom.y2-u,p,g,1,0,!1,h,a)}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(49),s=i(28);t.exports=function(t,e,i,r,o){var a=t.currentContext;if(s(t,a,e,r,o)){var h=e._displayOriginX,l=e._displayOriginY;e.isStroked&&(n(a,e),a.beginPath(),a.moveTo(e.geom.x1-h,e.geom.y1-l),a.lineTo(e.geom.x2-h,e.geom.y2-l),a.stroke()),a.restore()}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(1020),s=i(1021),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(98),s=i(70);t.exports=function(t,e,i,r,o){var a=this.pipeline,h=a._tempMatrix1,l=a._tempMatrix2,u=a._tempMatrix3;t.setPipeline(a),l.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),h.copyFrom(r.matrix),o?(h.multiplyWithOffset(o,-r.scrollX*e.scrollFactorX,-r.scrollY*e.scrollFactorY),l.e=e.x,l.f=e.y):(l.e-=r.scrollX*e.scrollFactorX,l.f-=r.scrollY*e.scrollFactorY),h.multiply(l,u);var c=e._displayOriginX,d=e._displayOriginY,f=r.alpha*e.alpha;e.isFilled&&n(a,u,e,f,c,d),e.isStroked&&s(a,e,f,c,d)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(37),s=i(49),r=i(28);t.exports=function(t,e,i,o,a){var h=t.currentContext;if(r(t,h,e,o,a)){var l=e._displayOriginX,u=e._displayOriginY,c=e.pathData,d=c.length-1,f=c[0]-l,p=c[1]-u;h.beginPath(),h.moveTo(f,p),e.closePath||(d-=2);for(var g=2;g * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(1023),s=i(1024),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(70),s=i(9);t.exports=function(t,e,i,r,o){var a=this.pipeline,h=a._tempMatrix1,l=a._tempMatrix2,u=a._tempMatrix3;t.setPipeline(a),l.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),h.copyFrom(r.matrix),o?(h.multiplyWithOffset(o,-r.scrollX*e.scrollFactorX,-r.scrollY*e.scrollFactorY),l.e=e.x,l.f=e.y):(l.e-=r.scrollX*e.scrollFactorX,l.f-=r.scrollY*e.scrollFactorY),h.multiply(l,u);var c=e._displayOriginX,d=e._displayOriginY,f=r.alpha*e.alpha;if(e.isFilled){var p=a.fillTint,g=s.getTintAppendFloatAlphaAndSwap(e.fillColor,e.fillAlpha*f);p.TL=g,p.TR=g,p.BL=g,p.BR=g,a.setTexture2D(),a.batchFillRect(-c,-d,e.width,e.height)}e.isStroked&&n(a,e,f,c,d)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(37),s=i(49),r=i(28);t.exports=function(t,e,i,o,a){var h=t.currentContext;if(r(t,h,e,o,a)){var l=e._displayOriginX,u=e._displayOriginY;e.isFilled&&(n(h,e),h.fillRect(-l,-u,e.width,e.height)),e.isStroked&&(s(h,e),h.beginPath(),h.rect(-l,-u,e.width,e.height),h.stroke()),h.restore()}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(1026),s=i(1027),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(98),s=i(70);t.exports=function(t,e,i,r,o){var a=this.pipeline,h=a._tempMatrix1,l=a._tempMatrix2,u=a._tempMatrix3;t.setPipeline(a),l.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),h.copyFrom(r.matrix),o?(h.multiplyWithOffset(o,-r.scrollX*e.scrollFactorX,-r.scrollY*e.scrollFactorY),l.e=e.x,l.f=e.y):(l.e-=r.scrollX*e.scrollFactorX,l.f-=r.scrollY*e.scrollFactorY),h.multiply(l,u);var c=e._displayOriginX,d=e._displayOriginY,f=r.alpha*e.alpha;e.isFilled&&n(a,u,e,f,c,d),e.isStroked&&s(a,e,f,c,d)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(37),s=i(49),r=i(28);t.exports=function(t,e,i,o,a){var h=t.currentContext;if(r(t,h,e,o,a)){var l=e._displayOriginX,u=e._displayOriginY,c=e.pathData,d=c.length-1,f=c[0]-l,p=c[1]-u;h.beginPath(),h.moveTo(f,p),e.closePath||(d-=2);for(var g=2;g * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(1029),s=i(1030),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(70),s=i(9);t.exports=function(t,e,i,r,o){var a=this.pipeline,h=a._tempMatrix1,l=a._tempMatrix2,u=a._tempMatrix3;t.setPipeline(a),l.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),h.copyFrom(r.matrix),o?(h.multiplyWithOffset(o,-r.scrollX*e.scrollFactorX,-r.scrollY*e.scrollFactorY),l.e=e.x,l.f=e.y):(l.e-=r.scrollX*e.scrollFactorX,l.f-=r.scrollY*e.scrollFactorY),h.multiply(l,u);var c=e._displayOriginX,d=e._displayOriginY,f=r.alpha*e.alpha;if(e.isFilled){var p=a.fillTint,g=s.getTintAppendFloatAlphaAndSwap(e.fillColor,e.fillAlpha*f);p.TL=g,p.TR=g,p.BL=g,p.BR=g;var v=e.geom.x1-c,m=e.geom.y1-d,y=e.geom.x2-c,x=e.geom.y2-d,T=e.geom.x3-c,w=e.geom.y3-d;a.setTexture2D(),a.batchFillTriangle(v,m,y,x,T,w,l,h)}e.isStroked&&n(a,e,f,c,d)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(37),s=i(49),r=i(28);t.exports=function(t,e,i,o,a){var h=t.currentContext;if(r(t,h,e,o,a)){var l=e._displayOriginX,u=e._displayOriginY,c=e.geom.x1-l,d=e.geom.y1-u,f=e.geom.x2-l,p=e.geom.y2-u,g=e.geom.x3-l,v=e.geom.y3-u;h.beginPath(),h.moveTo(c,d),h.lineTo(f,p),h.lineTo(g,v),h.closePath(),e.isFilled&&(n(h,e),h.fill()),e.isStroked&&(s(h,e),h.stroke()),h.restore()}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(188);i(5).register("blitter",(function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))}))},function(t,e,i){ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(189);i(5).register("container",(function(t,e,i){return this.displayList.add(new n(this.scene,t,e,i))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(394);i(5).register("dom",(function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o),this.updateList.add(o),o}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(190);i(5).register("dynamicBitmapText",(function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(396);i(5).register("extern",(function(){var t=new n(this.scene);return this.displayList.add(t),this.updateList.add(t),t}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(191);i(5).register("graphics",(function(t){return this.displayList.add(new n(this.scene,t))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(97);i(5).register("group",(function(t,e){return this.updateList.add(new n(this.scene,t,e))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(107);i(5).register("image",(function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5),s=i(194);n.register("particles",(function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5),s=i(408);n.register("follower",(function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5),s=i(195);n.register("renderTexture",(function(t,e,i,n,r,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,o))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(197);i(5).register("rope",(function(t,e,i,s,r,o,a,h){var l=new n(this.scene,t,e,i,s,r,o,a,h);return this.displayList.add(l),this.updateList.add(l)}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5),s=i(75);n.register("sprite",(function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(132);i(5).register("bitmapText",(function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(198);i(5).register("text",(function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(199);i(5).register("tileSprite",(function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(110);i(5).register("zone",(function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(200);i(5).register("video",(function(t,e,i){var s=new n(this.scene,t,e,i);return this.displayList.add(s),this.updateList.add(s),s}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(409),s=i(5);s.register("arc",(function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))})),s.register("circle",(function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,0,360,!1,s,r))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5),s=i(410);n.register("curve",(function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(411);i(5).register("ellipse",(function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5),s=i(412);n.register("grid",(function(t,e,i,n,r,o,a,h,l,u){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h,l,u))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5),s=i(413);n.register("isobox",(function(t,e,i,n,r,o,a){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5),s=i(414);n.register("isotriangle",(function(t,e,i,n,r,o,a,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5),s=i(415);n.register("line",(function(t,e,i,n,r,o,a,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5),s=i(416);n.register("polygon",(function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5),s=i(421);n.register("rectangle",(function(t,e,i,n,r,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,o))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(422);i(5).register("star",(function(t,e,i,s,r,o,a){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5),s=i(423);n.register("triangle",(function(t,e,i,n,r,o,a,h,l,u){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h,l,u))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(188),s=i(27),r=i(16),o=i(14);r.register("blitter",(function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),a=new n(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),s(this.scene,a,t),a}))},function(t,e,i){ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(27),s=i(189),r=i(16),o=i(14);r.register("container",(function(t,e){void 0===t&&(t={});var i=o(t,"x",0),r=o(t,"y",0),a=new s(this.scene,i,r);return void 0!==e&&(t.add=e),n(this.scene,a,t),a}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(190),s=i(27),r=i(16),o=i(14);r.register("dynamicBitmapText",(function(t,e){void 0===t&&(t={});var i=o(t,"font",""),r=o(t,"text",""),a=o(t,"size",!1),h=new n(this.scene,0,0,i,r,a);return void 0!==e&&(t.add=e),s(this.scene,h,t),h}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(16),s=i(191);n.register("graphics",(function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new s(this.scene,t);return t.add&&this.scene.sys.displayList.add(i),i}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(16),s=i(97);n.register("group",(function(t){return new s(this.scene,null,t)}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(27),s=i(16),r=i(14),o=i(107);s.register("image",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"frame",null),a=new o(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,a,t),a}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(16),s=i(14),r=i(2),o=i(194);n.register("particles",(function(t,e){void 0===t&&(t={});var i=s(t,"key",null),n=s(t,"frame",null),a=r(t,"emitters",null),h=new o(this.scene,i,n,a);return void 0!==e&&(t.add=e),r(t,"add",!1)&&this.displayList.add(h),this.updateList.add(h),h}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(27),s=i(16),r=i(14),o=i(195);s.register("renderTexture",(function(t,e){void 0===t&&(t={});var i=r(t,"x",0),s=r(t,"y",0),a=r(t,"width",32),h=r(t,"height",32),l=r(t,"key",void 0),u=r(t,"frame",void 0),c=new o(this.scene,i,s,a,h,l,u);return void 0!==e&&(t.add=e),n(this.scene,c,t),c}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(27),s=i(16),r=i(14),o=i(6),a=i(197);s.register("rope",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"frame",null),h=r(t,"horizontal",!0),l=o(t,"points",void 0),u=o(t,"colors",void 0),c=o(t,"alphas",void 0),d=new a(this.scene,0,0,i,s,l,h,u,c);return void 0!==e&&(t.add=e),n(this.scene,d,t),d}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(27),s=i(392),r=i(16),o=i(14),a=i(75);r.register("sprite",(function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),h=new a(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),n(this.scene,h,t),s(h,t),h}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(132),s=i(27),r=i(16),o=i(14),a=i(6);r.register("bitmapText",(function(t,e){void 0===t&&(t={});var i=a(t,"font",""),r=o(t,"text",""),h=o(t,"size",!1),l=a(t,"align",0),u=new n(this.scene,0,0,i,r,h,l);return void 0!==e&&(t.add=e),s(this.scene,u,t),u}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(27),s=i(16),r=i(14),o=i(198);s.register("text",(function(t,e){void 0===t&&(t={});var i=r(t,"text",""),s=r(t,"style",null),a=r(t,"padding",null);null!==a&&(s.padding=a);var h=new o(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,h,t),h.autoRound=r(t,"autoRound",!0),h.resolution=r(t,"resolution",1),h}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(27),s=i(16),r=i(14),o=i(199);s.register("tileSprite",(function(t,e){void 0===t&&(t={});var i=r(t,"x",0),s=r(t,"y",0),a=r(t,"width",512),h=r(t,"height",512),l=r(t,"key",""),u=r(t,"frame",""),c=new o(this.scene,i,s,a,h,l,u);return void 0!==e&&(t.add=e),n(this.scene,c,t),c}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(16),s=i(14),r=i(110);n.register("zone",(function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(27),s=i(16),r=i(14),o=i(200);s.register("video",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=new o(this.scene,0,0,i);return void 0!==e&&(t.add=e),n(this.scene,s,t),s}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(1076),s=i(1077),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(9);t.exports=function(t,e,i,s,r){var o=this.pipeline;t.setPipeline(o,e);var a=o._tempMatrix1,h=o._tempMatrix2,l=o._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(s.matrix),r?(a.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l)):(h.e-=s.scrollX*e.scrollFactorX,h.f-=s.scrollY*e.scrollFactorY,a.multiply(h,l));var u=e.frame.glTexture,c=e.vertices,d=e.uv,f=e.colors,p=e.alphas,g=c.length,v=Math.floor(.5*g);o.vertexCount+v>o.vertexCapacity&&o.flush(),o.setTexture2D(u,0);for(var m=o.vertexViewF32,y=o.vertexViewU32,x=o.vertexCount*o.vertexComponentCount-1,T=0,w=e.tintFill,b=0;b * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(1079),s=i(1080),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){if(e.shader){var r=t.currentPipeline;if(t.clearPipeline(),e.renderToTexture)e.load(),e.flush();else{var o=e._tempMatrix1,a=e._tempMatrix2,h=e._tempMatrix3;a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),o.copyFrom(n.matrix),s?(o.multiplyWithOffset(s,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),a.e=e.x,a.f=e.y):(a.e-=n.scrollX*e.scrollFactorX,a.f-=n.scrollY*e.scrollFactorY),o.multiply(a,h),t.width===e._rendererWidth&&t.height===e._rendererHeight||e.projOrtho(0,t.width,t.height,0),e.load(h.matrix),e.flush()}t.rebindPipeline(r)}}},function(t,e){t.exports=function(){}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(134);i(5).register("mesh",(function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(203);i(5).register("quad",(function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(204);i(5).register("shader",(function(t,e,i,s,r,o,a){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a))}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(27),s=i(16),r=i(14),o=i(6),a=i(134);s.register("mesh",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"frame",null),h=o(t,"vertices",[]),l=o(t,"colors",[]),u=o(t,"alphas",[]),c=o(t,"uv",[]),d=new a(this.scene,0,0,h,c,l,u,i,s);return void 0!==e&&(t.add=e),n(this.scene,d,t),d}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(27),s=i(16),r=i(14),o=i(203);s.register("quad",(function(t,e){void 0===t&&(t={});var i=r(t,"x",0),s=r(t,"y",0),a=r(t,"key",null),h=r(t,"frame",null),l=new o(this.scene,i,s,a,h);return void 0!==e&&(t.add=e),n(this.scene,l,t),l}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(27),s=i(16),r=i(14),o=i(204);s.register("shader",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"x",0),a=r(t,"y",0),h=r(t,"width",128),l=r(t,"height",128),u=new o(this.scene,i,s,a,h,l);return void 0!==e&&(t.add=e),n(this.scene,u,t),u}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(428),r=i(23),o=i(22),a=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once(o.BOOT,this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on(o.SHUTDOWN,this.shutdown,this),t.on(o.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",a,"lights"),t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(65);n.Area=i(1089),n.Circumference=i(268),n.CircumferencePoint=i(149),n.Clone=i(1090),n.Contains=i(55),n.ContainsPoint=i(1091),n.ContainsRect=i(1092),n.CopyFrom=i(1093),n.Equals=i(1094),n.GetBounds=i(1095),n.GetPoint=i(266),n.GetPoints=i(267),n.Offset=i(1096),n.OffsetPoint=i(1097),n.Random=i(150),t.exports=n},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(65);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(55);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(55);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(11);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(95);n.Area=i(1099),n.Circumference=i(399),n.CircumferencePoint=i(193),n.Clone=i(1100),n.Contains=i(96),n.ContainsPoint=i(1101),n.ContainsRect=i(1102),n.CopyFrom=i(1103),n.Equals=i(1104),n.GetBounds=i(1105),n.GetPoint=i(397),n.GetPoints=i(398),n.Offset=i(1106),n.OffsetPoint=i(1107),n.Random=i(157),t.exports=n},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(95);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(96);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(96);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(11);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){ /** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4),s=i(205);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a,h,l=t.x,u=t.y,c=t.radius,d=e.x,f=e.y,p=e.radius;if(u===f)0==(a=(o=-2*f)*o-4*(r=1)*(d*d+(h=(p*p-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+f*f-p*p))?i.push(new n(h,-o/(2*r))):a>0&&(i.push(new n(h,(-o+Math.sqrt(a))/(2*r))),i.push(new n(h,(-o-Math.sqrt(a))/(2*r))));else{var g=(l-d)/(u-f),v=(p*p-c*c-d*d+l*l-f*f+u*u)/(2*(u-f));0==(a=(o=2*u*g-2*v*g-2*l)*o-4*(r=g*g+1)*(l*l+u*u+v*v-c*c-2*u*v))?(h=-o/(2*r),i.push(new n(h,v-h*g))):a>0&&(h=(-o+Math.sqrt(a))/(2*r),i.push(new n(h,v-h*g)),h=(-o-Math.sqrt(a))/(2*r),i.push(new n(h,v-h*g)))}}return i}},function(t,e,i){ /** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(207),s=i(206);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC(),h=e.getLineD();n(r,t,i),n(o,t,i),n(a,t,i),n(h,t,i)}return i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(11),s=i(135);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e,i){ /** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(209),s=i(135);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=t.getLineD();n(r,e,i),n(o,e,i),n(a,e,i),n(h,e,i)}return i}},function(t,e,i){ /** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(432),s=i(209);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(r,t,i),s(o,t,i),s(a,t,i)}return i}},function(t,e,i){ /** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(207),s=i(434);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();n(r,e,i),n(o,e,i),n(a,e,i)}return i}},function(t,e,i){ /** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(437),s=i(435);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(t,r,i),s(t,o,i),s(t,a,i)}return i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(439);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(56);n.Angle=i(85),n.BresenhamPoints=i(288),n.CenterOn=i(1118),n.Clone=i(1119),n.CopyFrom=i(1120),n.Equals=i(1121),n.Extend=i(1122),n.GetEasedPoints=i(1123),n.GetMidPoint=i(1124),n.GetNearestPoint=i(1125),n.GetNormal=i(1126),n.GetPoint=i(275),n.GetPoints=i(153),n.GetShortestDistance=i(1127),n.Height=i(1128),n.Length=i(57),n.NormalAngle=i(440),n.NormalX=i(1129),n.NormalY=i(1130),n.Offset=i(1131),n.PerpSlope=i(1132),n.Random=i(154),n.ReflectAngle=i(1133),n.Rotate=i(1134),n.RotateAroundPoint=i(1135),n.RotateAroundXY=i(211),n.SetToAngle=i(1136),n.Slope=i(1137),n.Width=i(1138),t.exports=n},function(t,e){t.exports=function(t,e,i){var n=e-(t.x1+t.x2)/2,s=i-(t.y1+t.y2)/2;return t.x1+=n,t.y1+=s,t.x2+=n,t.y2+=s,t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(56);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(57);t.exports=function(t,e,i){void 0===i&&(i=e);var s=n(t),r=t.x2-t.x1,o=t.y2-t.y1;return e&&(t.x1=t.x1-r/s*e,t.y1=t.y1-o/s*e),i&&(t.x2=t.x2+r/s*i,t.y2=t.y2+o/s*i),t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(319),s=i(69),r=i(4);t.exports=function(t,e,i,o,a){void 0===o&&(o=0),void 0===a&&(a=[]);var h,l,u=[],c=t.x1,d=t.y1,f=t.x2-c,p=t.y2-d,g=s(e,a),v=i-1;for(h=0;h0){var m=u[0],y=[m];for(h=1;h=o&&(y.push(x),m=x)}var T=u[u.length-1];return n(m,T) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},function(t,e,i){ /** * @author Richard Davey * @author Florian Mertens * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=(o-s)*(o-s)+(a-r)*(a-r);if(0===h)return i;var l=((e.x-s)*(o-s)+(e.y-r)*(a-r))/h;return i.x=s+l*(o-s),i.y=r+l*(a-r),i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(15),s=i(85),r=i(4);t.exports=function(t,e){void 0===e&&(e=new r);var i=s(t)-n.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=(s-i)*(s-i)+(r-n)*(r-n);if(0===o)return!1;var a=((n-e.y)*(s-i)-(i-e.x)*(r-n))/o;return Math.abs(a)*Math.sqrt(o)}},function(t,e){t.exports=function(t){return Math.abs(t.y1-t.y2)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(15),s=i(85);t.exports=function(t){return Math.cos(s(t)-n.TAU)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(15),s=i(85);t.exports=function(t){return Math.sin(s(t)-n.TAU)}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e){t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(85),s=i(440);t.exports=function(t,e){return 2*s(e)-Math.PI-n(t)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(211);t.exports=function(t,e){var i=(t.x1+t.x2)/2,s=(t.y1+t.y2)/2;return n(t,i,s,e)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(211);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e){t.exports=function(t,e,i,n,s){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*s,t.y2=i+Math.sin(n)*s,t}},function(t,e){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},function(t,e){t.exports=function(t){return Math.abs(t.x1-t.x2)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);n.Ceil=i(1140),n.Clone=i(1141),n.CopyFrom=i(1142),n.Equals=i(1143),n.Floor=i(1144),n.GetCentroid=i(1145),n.GetMagnitude=i(441),n.GetMagnitudeSq=i(442),n.GetRectangleFromPoints=i(1146),n.Interpolate=i(1147),n.Invert=i(1148),n.Negative=i(1149),n.Project=i(1150),n.ProjectUnit=i(1151),n.SetMagnitude=i(1152),t.exports=n},function(t,e){t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t){return new n(t.x,t.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},function(t,e){t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e){if(void 0===e&&(e=new n),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(11);t.exports=function(t,e){void 0===e&&(e=new n);for(var i=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,a=0;ai&&(i=h.x),h.xr&&(r=h.y),h.y * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=new n),s.x=t.x+(e.x-t.x)*i,s.y=t.y+(e.y-t.y)*i,s}},function(t,e){t.exports=function(t){return t.setTo(t.y,t.x)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.setTo(-t.x,-t.y)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4),s=i(442);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=(t.x*e.x+t.y*e.y)/s(e);return 0!==r&&(i.x=r*e.x,i.y=r*e.y),i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x*e.x+t.y*e.y;return 0!==s&&(i.x=s*e.x,i.y=s*e.y),i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(441);t.exports=function(t,e){if(0!==t.x||0!==t.y){var i=n(t);t.x/=i,t.y/=i}return t.x*=e,t.y*=e,t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(201);n.Clone=i(1154),n.Contains=i(202),n.ContainsPoint=i(1155),n.GetAABB=i(417),n.GetNumberArray=i(1156),n.GetPoints=i(418),n.Perimeter=i(419),n.Reverse=i(1157),n.Smooth=i(420),t.exports=n},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(201);t.exports=function(t){return new n(t.points)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(202);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=[]);for(var i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(11);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(48);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(212);t.exports=function(t,e){var i=n(t);return i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(212);t.exports=function(t,e){var i=n(t);return i>n(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){ /** * @author samme * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(11);t.exports=function(t,e,i,s,r){return void 0===r&&(r=new n),r.setTo(Math.min(t,i),Math.min(e,s),Math.abs(t-i),Math.abs(e-s))}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(168);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(11),s=i(135);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4),s=i(35);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(172),s=i(444),r=i(4);t.exports=function(t,e,i){if(void 0===i&&(i=new r),s(t,e))switch(n(0,3)){case 0:i.x=t.x+Math.random()*(e.right-t.x),i.y=t.y+Math.random()*(e.top-t.y);break;case 1:i.x=e.x+Math.random()*(t.right-e.x),i.y=e.bottom+Math.random()*(t.bottom-e.bottom);break;case 2:i.x=t.x+Math.random()*(e.x-t.x),i.y=e.y+Math.random()*(t.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(t.right-e.right),i.y=t.y+Math.random()*(e.bottom-t.y)}return i}},function(t,e){t.exports=function(t,e){return t.width===e.width&&t.height===e.height}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=e),t.width*=e,t.height*=i,t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(71);n.Area=i(1185),n.BuildEquilateral=i(1186),n.BuildFromPolygon=i(1187),n.BuildRight=i(1188),n.CenterOn=i(1189),n.Centroid=i(445),n.CircumCenter=i(1190),n.CircumCircle=i(1191),n.Clone=i(1192),n.Contains=i(83),n.ContainsArray=i(210),n.ContainsPoint=i(1193),n.CopyFrom=i(1194),n.Decompose=i(438),n.Equals=i(1195),n.GetPoint=i(424),n.GetPoints=i(425),n.InCenter=i(447),n.Perimeter=i(1196),n.Offset=i(446),n.Random=i(158),n.Rotate=i(1197),n.RotateAroundPoint=i(1198),n.RotateAroundXY=i(213),t.exports=n},function(t,e){t.exports=function(t){var e=t.x1,i=t.y1,n=t.x2,s=t.y2,r=t.x3,o=t.y3;return Math.abs(((r-e)*(s-i)-(n-e)*(o-i))/2)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(71);t.exports=function(t,e,i){var s=i*(Math.sqrt(3)/2);return new n(t,e,t+i/2,e+s,t-i/2,e+s)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(66),s=i(71);t.exports=function(t,e,i,r,o){void 0===e&&(e=null),void 0===i&&(i=1),void 0===r&&(r=1),void 0===o&&(o=[]);for(var a,h,l,u,c,d,f,p,g,v=n(t,e),m=0;m * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(71);t.exports=function(t,e,i,s){return void 0===s&&(s=i),new n(t,e,t,e-s,t+i,e)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(445),s=i(446);t.exports=function(t,e,i,r){void 0===r&&(r=n);var o=r(t),a=e-o.x,h=i-o.y;return s(t,a,h)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(3);function s(t,e,i,n){return t*n-e*i}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x3,r=t.y3,o=t.x1-i,a=t.y1-r,h=t.x2-i,l=t.y2-r,u=2*s(o,a,h,l),c=s(a,o*o+a*a,l,h*h+l*l),d=s(o,o*o+a*a,h,h*h+l*l);return e.x=i-c/u,e.y=r+d/u,e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(65);t.exports=function(t,e){void 0===e&&(e=new n);var i,s,r=t.x1,o=t.y1,a=t.x2,h=t.y2,l=t.x3,u=t.y3,c=a-r,d=h-o,f=l-r,p=u-o,g=c*(r+a)+d*(o+h),v=f*(r+l)+p*(o+u),m=2*(c*(u-h)-d*(l-a));if(Math.abs(m)<1e-6){var y=Math.min(r,a,l),x=Math.min(o,h,u);i=.5*(Math.max(r,a,l)-y),s=.5*(Math.max(o,h,u)-x),e.x=y+i,e.y=x+s,e.radius=Math.sqrt(i*i+s*s)}else e.x=(p*g-d*v)/m,e.y=(c*v-f*g)/m,i=e.x-r,s=e.y-o,e.radius=Math.sqrt(i*i+s*s);return e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(71);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(83);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2&&t.x3===e.x3&&t.y3===e.y3}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(57);t.exports=function(t){var e=t.getLineA(),i=t.getLineB(),s=t.getLineC();return n(e)+n(i)+n(s)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(213),s=i(447);t.exports=function(t,e){var i=s(t);return n(t,i.x,i.y,e)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(213);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(179),s=i(18),r={CreateInteractiveObject:i(448),Events:i(54),Gamepad:i(1200),InputManager:i(364),InputPlugin:i(1212),InputPluginCache:i(136),Keyboard:i(1214),Mouse:i(1231),Pointer:i(367),Touch:i(1232)};r=s(!1,r,n),t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Axis:i(449),Button:i(450),Events:i(214),Gamepad:i(451),GamepadPlugin:i(1207),Configs:i(1208)}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="down"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="up"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="connected"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="disconnected"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="down"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="up"},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(10),r=i(214),o=i(451),a=i(6),h=i(136),l=i(54),u=new n({Extends:s,initialize:function(t){s.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,t.pluginEvents.once(l.BOOT,this.boot,this),t.pluginEvents.on(l.START,this.start,this)},boot:function(){var t=this.scene.sys.game,e=this.settings.input,i=t.config;this.enabled=a(e,"gamepad",i.inputGamepad)&&t.device.input.gamepads,this.target=a(e,"gamepad.target",i.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(l.DESTROY,this.destroy,this)},start:function(){this.enabled&&this.startListeners(),this.sceneInputPlugin.pluginEvents.once(l.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=this.target,i=function(e){!e.defaultPrevented&&t.isActive()&&(t.refreshPads(),t.queue.push(e))};this.onGamepadHandler=i,e.addEventListener("gamepadconnected",i,!1),e.addEventListener("gamepaddisconnected",i,!1),this.sceneInputPlugin.pluginEvents.on(l.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(l.UPDATE,this.update)},disconnectAll:function(){for(var t=0;t * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={DUALSHOCK_4:i(1209),SNES_USB:i(1210),XBOX_360:i(1211)}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(65),s=i(55),r=i(0),o=i(179),a=i(448),h=i(1213),l=i(53),u=i(95),c=i(96),d=i(54),f=i(10),p=i(2),g=i(47),v=i(136),m=i(7),y=i(23),x=i(11),T=i(48),w=i(22),b=i(71),E=i(83),S=new r({Extends:f,initialize:function(t){f.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new f,this.enabled=!0,this.displayList,this.cameras,v.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var e={cancelled:!1};this._eventContainer={stopPropagation:function(){e.cancelled=!0}},this._eventData=e,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,t.sys.events.once(w.BOOT,this.boot,this),t.sys.events.on(w.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(w.DESTROY,this.destroy,this),this.pluginEvents.emit(d.BOOT)},start:function(){var t=this.systems.events;t.on(w.TRANSITION_START,this.transitionIn,this),t.on(w.TRANSITION_OUT,this.transitionOut,this),t.on(w.TRANSITION_COMPLETE,this.transitionComplete,this),t.on(w.PRE_UPDATE,this.preUpdate,this),t.once(w.SHUTDOWN,this.shutdown,this),this.manager.events.on(d.GAME_OUT,this.onGameOut,this),this.manager.events.on(d.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(d.START)},onGameOver:function(t){this.isActive()&&this.emit(d.GAME_OVER,t.timeStamp,t)},onGameOut:function(t){this.isActive()&&this.emit(d.GAME_OUT,t.timeStamp,t)},preUpdate:function(){this.pluginEvents.emit(d.PRE_UPDATE);var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,n=e.length;if(0!==i||0!==n){for(var s=this._list,r=0;r-1&&(s.splice(a,1),this.clear(o,!0))}t.length=0,this._pendingRemoval.length=0,this._list=s.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,n=this.manager,s=n.pointers,r=n.pointersTotal;for(i=0;i0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var a=!1;for(i=0;i0&&(a=!0)}return a},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,n=!1,s=0;s0&&(n=!0)}return this._updatedThisFrame=!0,n},clear:function(t,e){void 0===e&&(e=!1);var i=t.input;if(i){e||this.queueForRemoval(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,this.manager.resetCursor(i),t.input=null;var n=this._draggable.indexOf(t);return n>-1&&this._draggable.splice(n,1),(n=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(n,1),(n=this._over[0].indexOf(t))>-1&&this._over[0].splice(n,1),t}},disable:function(t){t.input.enabled=!1},enable:function(t,e,i,n){return void 0===n&&(n=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&n&&!t.input.dropZone&&(t.input.dropZone=n),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=n,s}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,n=this._eventData,s=this._eventContainer;n.cancelled=!1;for(var r=!1,o=0;o0&&l(t.x,t.y,t.downX,t.downY)>=s||n>0&&e>=t.downTime+n)&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i1&&(this.sortGameObjects(i),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],n=0;n0?(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),e[0]?(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):a.target=null)}else!h&&e[0]&&(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h));if(o.parentContainer){var u=t.x-a.dragStartXGlobal,c=t.y-a.dragStartYGlobal,f=o.getParentRotation(),p=u*Math.cos(f)+c*Math.sin(f),g=c*Math.cos(f)-u*Math.sin(f);p*=1/o.parentContainer.scaleX,g*=1/o.parentContainer.scaleY,s=p+a.dragStartX,r=g+a.dragStartY}else s=t.x-a.dragX,r=t.y-a.dragY;o.emit(d.GAMEOBJECT_DRAG,t,s,r),this.emit(d.DRAG,t,o,s,r)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i0){var r=this.manager,o=this._eventData,a=this._eventContainer;o.cancelled=!1;for(var h=!1,l=0;l0){var s=this.manager,r=this._eventData,o=this._eventContainer;r.cancelled=!1;var a=!1;this.sortGameObjects(e);for(var h=0;h0){for(this.sortGameObjects(s),e=0;e0){for(this.sortGameObjects(r),e=0;e-1&&this._draggable.splice(s,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var n=!1,s=!1,r=!1,o=!1,h=!1,l=!0;if(m(e)){var u=e;e=p(u,"hitArea",null),i=p(u,"hitAreaCallback",null),n=p(u,"draggable",!1),s=p(u,"dropZone",!1),r=p(u,"cursor",!1),o=p(u,"useHandCursor",!1),h=p(u,"pixelPerfect",!1);var c=p(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c)),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var d=0;d=e}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Events:i(137),KeyboardManager:i(365),KeyboardPlugin:i(1222),Key:i(452),KeyCodes:i(124),KeyCombo:i(453),JustDown:i(1227),JustUp:i(1228),DownDuration:i(1229),UpDuration:i(1230)}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="keydown"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="keyup"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="keycombomatch"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="down"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="keydown-"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="keyup-"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="up"},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(10),r=i(137),o=i(20),a=i(6),h=i(54),l=i(136),u=i(452),c=i(124),d=i(453),f=i(1226),p=i(93),g=new n({Extends:s,initialize:function(t){s.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=a(t,"keyboard",!0);var e=a(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.useQueue?this.sceneInputPlugin.pluginEvents.on(h.UPDATE,this.update,this):this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var n={};if("string"==typeof t){t=t.split(",");for(var s=0;s-1?n[s]=t:n[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),n[t]||(n[t]=new u(this,t),e&&this.addCapture(t),n[t].setEmitOnRepeat(i)),n[t]},removeKey:function(t,e){void 0===e&&(e=!1);var i,n=this.keys;if(t instanceof u){var s=n.indexOf(t);s>-1&&(i=this.keys[s],this.keys[s]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return n[t]&&(i=n[t],n[t]=void 0),i&&(i.plugin=null,e&&i.destroy()),this},createCombo:function(t,e){return new d(this,t,e)},checkDown:function(t,e){if(this.enabled&&t.isDown){var i=p(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1224);t.exports=function(t,e){if(e.matched)return!0;var i=!1,s=!1;if(t.keyCode===e.current)if(e.index>0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(124),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},function(t,e){t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={MouseManager:i(366)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={TouchManager:i(368)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(17),s=i(18),r={Events:i(82),FileTypes:i(1234),File:i(21),FileTypesManager:i(8),GetURL:i(138),LoaderPlugin:i(1258),MergeXHRSettings:i(215),MultiFile:i(61),XHRLoader:i(454),XHRSettings:i(139)};r=s(!1,r,n),t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={AnimationJSONFile:i(1235),AtlasJSONFile:i(1236),AtlasXMLFile:i(1237),AudioFile:i(455),AudioSpriteFile:i(1238),BinaryFile:i(1239),BitmapFontFile:i(1240),CSSFile:i(1241),GLSLFile:i(1242),HTML5AudioFile:i(456),HTMLFile:i(1243),HTMLTextureFile:i(1244),ImageFile:i(72),JSONFile:i(60),MultiAtlasFile:i(1245),MultiScriptFile:i(1246),PackFile:i(1247),PluginFile:i(1248),SceneFile:i(1249),ScenePluginFile:i(1250),ScriptFile:i(457),SpriteSheetFile:i(1251),SVGFile:i(1252),TextFile:i(458),TilemapCSVFile:i(1253),TilemapImpactFile:i(1254),TilemapJSONFile:i(1255),UnityAtlasFile:i(1256),VideoFile:i(1257),XMLFile:i(216)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(8),r=i(60),o=i(82),a=new n({Extends:r,initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.type="animationJSON"},onProcess:function(){this.loader.once(o.POST_PROCESS,this.onLoadComplete,this),r.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});s.register("animation",(function(t,e,i,n){if(Array.isArray(t))for(var s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(8),r=i(2),o=i(72),a=i(7),h=i(60),l=i(61),u=new n({Extends:l,initialize:function(t,e,i,n,s,u){var c,d;if(a(e)){var f=e;e=r(f,"key"),c=new o(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new h(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","json"),xhrSettings:r(f,"atlasXhrSettings")})}else c=new o(t,e,i,s),d=new h(t,e,n,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0}}});s.register("atlas",(function(t,e,i,n,s){var r;if(Array.isArray(t))for(var o=0;o * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(8),r=i(2),o=i(72),a=i(7),h=i(61),l=i(216),u=new n({Extends:h,initialize:function(t,e,i,n,s,u){var c,d;if(a(e)){var f=e;e=r(f,"key"),c=new o(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new l(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","xml"),xhrSettings:r(f,"atlasXhrSettings")})}else c=new o(t,e,i,s),d=new l(t,e,n,u);c.linkFile?h.call(this,t,"atlasxml",e,[c,d,c.linkFile]):h.call(this,t,"atlasxml",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0}}});s.register("atlasXML",(function(t,e,i,n,s){var r;if(Array.isArray(t))for(var o=0;o * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(455),s=i(0),r=i(8),o=i(2),a=i(7),h=i(60),l=i(61),u=new s({Extends:l,initialize:function(t,e,i,s,r,u,c){if(a(e)){var d=e;e=o(d,"key"),i=o(d,"jsonURL"),s=o(d,"audioURL"),r=o(d,"audioConfig"),u=o(d,"audioXhrSettings"),c=o(d,"jsonXhrSettings")}var f;if(s){var p=n.create(t,e,s,r,u);p&&(f=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[p,f]),this.config.resourceLoad=!1)}else f=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[f]),this.config.resourceLoad=!0,this.config.audioConfig=r,this.config.audioXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,this.config.resourceLoad&&"json"===t.type&&t.data.hasOwnProperty("resources"))){var e=t.data.resources,i=o(this.config,"audioConfig"),s=o(this.config,"audioXhrSettings"),r=n.create(this.loader,t.key,e,i,s);r&&(this.addToMultiFile(r),this.loader.addFile(r))}},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache(),e.addToCache(),this.complete=!0}}});r.register("audioSprite",(function(t,e,i,n,s,r){var o,a=this.systems.game,h=a.config.audio,l=a.device.audio;if(h&&h.noAudio||!l.webAudio&&!l.audioData)return this;if(Array.isArray(t))for(var c=0;c * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(21),o=i(8),a=i(2),h=i(7),l=new n({Extends:r,initialize:function(t,e,i,n,s){var o="bin";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),n=a(l,"xhrSettings"),o=a(l,"extension",o),s=a(l,"dataType",s)}var u={type:"binary",cache:t.cacheManager.binary,extension:o,responseType:"arraybuffer",key:e,url:i,xhrSettings:n,config:{dataType:s}};r.call(this,t,u)},onProcess:function(){this.state=s.FILE_PROCESSING;var t=this.config.dataType;this.data=t?new t(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});o.register("binary",(function(t,e,i,n){if(Array.isArray(t))for(var s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(8),r=i(2),o=i(72),a=i(7),h=i(61),l=i(187),u=i(216),c=new n({Extends:h,initialize:function(t,e,i,n,s,l){var c,d;if(a(e)){var f=e;e=r(f,"key"),c=new o(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new u(t,{key:e,url:r(f,"fontDataURL"),extension:r(f,"fontDataExtension","xml"),xhrSettings:r(f,"fontDataXhrSettings")})}else c=new o(t,e,i,s),d=new u(t,e,n,l);c.linkFile?h.call(this,t,"bitmapfont",e,[c,d,c.linkFile]):h.call(this,t,"bitmapfont",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache(),e.addToCache(),this.loader.cacheManager.bitmapFont.add(t.key,{data:l(e.data),texture:t.key,frame:null}),this.complete=!0}}});s.register("bitmapFont",(function(t,e,i,n,s){var r;if(Array.isArray(t))for(var o=0;o * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(21),o=i(8),a=i(2),h=i(7),l=new n({Extends:r,initialize:function(t,e,i,n){var s="css";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"script",cache:!1,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("css",(function(t,e,i){if(Array.isArray(t))for(var n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(21),o=i(8),a=i(2),h=i(7),l=i(352),u=new n({Extends:r,initialize:function(t,e,i,n,s){var o="glsl";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),n=a(l,"shaderType","fragment"),s=a(l,"xhrSettings"),o=a(l,"extension",o)}else void 0===n&&(n="fragment");var u={type:"glsl",cache:t.cacheManager.shader,extension:o,responseType:"text",key:e,url:i,config:{shaderType:n},xhrSettings:s};r.call(this,t,u)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.split("\n"),e=this.extractBlock(t,0);if(e)for(;e;){var i=this.getShaderName(e.header),n=this.getShaderType(e.header),s=this.getShaderUniforms(e.header),r=e.shader;if(this.cache.has(i)){var o=this.cache.get(i);"fragment"===n?o.fragmentSrc=r:o.vertexSrc=r,o.uniforms||(o.uniforms=s)}else"fragment"===n?this.cache.add(i,new l(i,r,"",s)):this.cache.add(i,new l(i,"",r,s));e=this.extractBlock(t,e.offset)}else"fragment"===this.config.shaderType?this.cache.add(this.key,new l(this.key,this.data)):this.cache.add(this.key,new l(this.key,"",this.data));this.pendingDestroy()},getShaderName:function(t){for(var e=0;e * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(21),o=i(8),a=i(2),h=i(7),l=new n({Extends:r,initialize:function(t,e,i,n){var s="html";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"text",cache:t.cacheManager.html,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("html",(function(t,e,i){if(Array.isArray(t))for(var n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(21),o=i(8),a=i(2),h=i(7),l=new n({Extends:r,initialize:function(t,e,i,n,s,o){void 0===n&&(n=512),void 0===s&&(s=512);var l="html";if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),o=a(u,"xhrSettings"),l=a(u,"extension",l),n=a(u,"width",n),s=a(u,"height",s)}var c={type:"html",cache:t.textureManager,extension:l,responseType:"text",key:e,url:i,xhrSettings:o,config:{width:n,height:s}};r.call(this,t,c)},onProcess:function(){this.state=s.FILE_PROCESSING;var t=this.config.width,e=this.config.height,i=[];i.push(''),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],o=this;try{var a=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return o.state=s.FILE_ERRORED,void o.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(o.data),o.onProcessError()},r.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});o.register("htmlTexture",(function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(8),r=i(2),o=i(72),a=i(7),h=i(60),l=i(61),u=new n({Extends:l,initialize:function(t,e,i,n,s,o,u){if(a(e)){var c=e;e=r(c,"key"),i=r(c,"url",!1)?r(c,"url"):r(c,"atlasURL"),o=r(c,"xhrSettings"),n=r(c,"path"),s=r(c,"baseURL"),u=r(c,"textureXhrSettings")}var d=new h(t,e,i,o);l.call(this,t,"multiatlas",e,[d]),this.config.path=n,this.config.baseURL=s,this.config.textureXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"json"===t.type&&t.data.hasOwnProperty("textures"))){var e=t.data.textures,i=this.config,n=this.loader,s=n.baseURL,a=n.path,h=n.prefix,l=r(i,"baseURL",this.baseURL),u=r(i,"path",this.path),c=r(i,"prefix",this.prefix),d=r(i,"textureXhrSettings");n.setBaseURL(l),n.setPath(u),n.setPrefix(c);for(var f=0;f * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(8),r=i(2),o=i(7),a=i(61),h=i(457),l=new n({Extends:a,initialize:function(t,e,i,n){var s="js",l=[];if(o(e)){var u=e;e=r(u,"key"),i=r(u,"url"),n=r(u,"xhrSettings"),s=r(u,"extension",s)}Array.isArray(i)||(i=[i]);for(var c=0;c * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(8),o=i(60),a=new n({Extends:o,initialize:function(t,e,i,n,s){o.call(this,t,e,i,n,s),this.type="packfile"},onProcess:function(){this.state!==s.FILE_POPULATED&&(this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.loader.addPack(this.data,this.config),this.onProcessComplete()}});r.register("pack",(function(t,e,i,n){if(Array.isArray(t))for(var s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(21),o=i(8),a=i(2),h=i(7),l=new n({Extends:r,initialize:function(t,e,i,n,o,l){var u="js";if(h(e)){var c=e;e=a(c,"key"),i=a(c,"url"),l=a(c,"xhrSettings"),u=a(c,"extension",u),n=a(c,"start"),o=a(c,"mapping")}var d={type:"plugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{start:n,mapping:o}};r.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=s.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=a(e,"start",!1),n=a(e,"mapping",null);if(this.state===s.FILE_POPULATED)t.install(this.key,this.data,i,n);else{this.state=s.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var r=t.install(this.key,window[this.key],i,n);(i||n)&&(this.loader.systems[n]=r,this.loader.scene[n]=r)}this.onProcessComplete()}});o.register("plugin",(function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(21),o=i(8),a=i(2),h=i(7),l=new n({Extends:r,initialize:function(t,e,i,n){var s="js";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"text",cache:t.cacheManager.text,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.concat("(function(){\nreturn new "+this.key+"();\n}).call(this);"),e=eval;this.loader.sceneManager.add(this.key,e(t)),this.complete=!0}});o.register("sceneFile",(function(t,e,i){if(Array.isArray(t))for(var n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(21),o=i(8),a=i(2),h=i(7),l=new n({Extends:r,initialize:function(t,e,i,n,o,l){var u="js";if(h(e)){var c=e;e=a(c,"key"),i=a(c,"url"),l=a(c,"xhrSettings"),u=a(c,"extension",u),n=a(c,"systemKey"),o=a(c,"sceneKey")}var d={type:"scenePlugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{systemKey:n,sceneKey:o}};r.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=s.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=this.key,n=a(e,"systemKey",i),r=a(e,"sceneKey",i);this.state===s.FILE_POPULATED?t.installScenePlugin(n,this.data,r,this.loader.scene,!0):(this.state=s.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),t.installScenePlugin(n,window[this.key],r,this.loader.scene,!0)),this.onProcessComplete()}});o.register("scenePlugin",(function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(8),r=i(72),o=new n({Extends:r,initialize:function(t,e,i,n,s){r.call(this,t,e,i,s,n),this.type="spritesheet"},addToCache:function(){var t=this.cache.addSpriteSheet(this.key,this.data,this.config);this.pendingDestroy(t)}});s.register("spritesheet",(function(t,e,i,n){if(Array.isArray(t))for(var s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(21),o=i(8),a=i(2),h=i(7),l=new n({Extends:r,initialize:function(t,e,i,n,s){var o="svg";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),n=a(l,"svgConfig",{}),s=a(l,"xhrSettings"),o=a(l,"extension",o)}var u={type:"svg",cache:t.textureManager,extension:o,responseType:"text",key:e,url:i,xhrSettings:s,config:{width:a(n,"width"),height:a(n,"height"),scale:a(n,"scale")}};r.call(this,t,u)},onProcess:function(){this.state=s.FILE_PROCESSING;var t=this.xhrLoader.responseText,e=[t],i=this.config.width,n=this.config.height,o=this.config.scale;t:if(i&&n||o){var a=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("svg")[0],h=a.hasAttribute("viewBox"),l=parseFloat(a.getAttribute("width")),u=parseFloat(a.getAttribute("height"));if(!h&&l&&u)a.setAttribute("viewBox","0 0 "+l+" "+u);else if(h&&!l&&!u){var c=a.getAttribute("viewBox").split(/\s+|,/);l=c[2],u=c[3]}if(o){if(!l||!u)break t;i=l*o,n=u*o}a.setAttribute("width",i.toString()+"px"),a.setAttribute("height",n.toString()+"px"),e=[(new XMLSerializer).serializeToString(a)]}try{var d=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(t){return void this.onProcessError()}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var f=this,p=!1;this.data.onload=function(){p||r.revokeObjectURL(f.data),f.onProcessComplete()},this.data.onerror=function(){p?f.onProcessError():(p=!0,r.revokeObjectURL(f.data),f.data.src="data:image/svg+xml,"+encodeURIComponent(e.join("")))},r.createObjectURL(this.data,d,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});o.register("svg",(function(t,e,i,n){if(Array.isArray(t))for(var s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(21),o=i(8),a=i(2),h=i(7),l=i(32),u=new n({Extends:r,initialize:function(t,e,i,n){var s="csv";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var u={type:"tilemapCSV",cache:t.cacheManager.tilemap,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,u),this.tilemapFormat=l.CSV},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,t),this.pendingDestroy(t)}});o.register("tilemapCSV",(function(t,e,i){if(Array.isArray(t))for(var n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(8),r=i(60),o=i(32),a=new n({Extends:r,initialize:function(t,e,i,n){r.call(this,t,e,i,n),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.WELTMEISTER,data:this.data};this.cache.add(this.key,t),this.pendingDestroy(t)}});s.register("tilemapImpact",(function(t,e,i){if(Array.isArray(t))for(var n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(8),r=i(60),o=i(32),a=new n({Extends:r,initialize:function(t,e,i,n){r.call(this,t,e,i,n),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.TILED_JSON,data:this.data};this.cache.add(this.key,t),this.pendingDestroy(t)}});s.register("tilemapTiledJSON",(function(t,e,i){if(Array.isArray(t))for(var n=0;n * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(8),r=i(2),o=i(72),a=i(7),h=i(61),l=i(458),u=new n({Extends:h,initialize:function(t,e,i,n,s,u){var c,d;if(a(e)){var f=e;e=r(f,"key"),c=new o(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new l(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","txt"),xhrSettings:r(f,"atlasXhrSettings")})}else c=new o(t,e,i,s),d=new l(t,e,n,u);c.linkFile?h.call(this,t,"unityatlas",e,[c,d,c.linkFile]):h.call(this,t,"unityatlas",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0}}});s.register("unityAtlas",(function(t,e,i,n,s){var r;if(Array.isArray(t))for(var o=0;o * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(21),o=i(8),a=i(138),h=i(2),l=i(7),u=new n({Extends:r,initialize:function(t,e,i,n,s,o,a){void 0===n&&(n="loadeddata"),void 0===s&&(s=!1),void 0===o&&(o=!1),"loadeddata"!==n&&"canplay"!==n&&"canplaythrough"!==n&&(n="loadeddata");var h={type:"video",cache:t.cacheManager.video,extension:i.type,responseType:"blob",key:e,url:i.url,xhrSettings:a,config:{loadEvent:n,asBlob:s,noAudio:o}};this.onLoadCallback=this.onVideoLoadHandler.bind(this),this.onErrorCallback=this.onVideoErrorHandler.bind(this),r.call(this,t,h)},onProcess:function(){if(this.state=s.FILE_PROCESSING,this.config.asBlob){var t=this.createVideoElement();this.data=t;var e=this;this.data.onloadeddata=function(){e.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(e.data),e.onProcessError()},r.createObjectURL(t,this.xhrLoader.response,""),t.load()}else this.onProcessComplete()},createVideoElement:function(){var t=document.createElement("video");return t.controls=!1,t.crossOrigin=this.loader.crossOrigin,this.config.noAudio&&(t.muted=!0,t.defaultMuted=!0,t.setAttribute("autoplay","autoplay")),t.setAttribute("playsinline","playsinline"),t.setAttribute("preload","auto"),t},onVideoLoadHandler:function(t){var e=t.target;e.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),e.removeEventListener("error",this.onErrorCallback,!0),this.data=e,this.resetXHR(),this.loader.nextFile(this,!0)},onVideoErrorHandler:function(t){var e=t.target;e&&(e.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),e.removeEventListener("error",this.onErrorCallback,!0)),this.resetXHR(),this.loader.nextFile(this,!1)},load:function(){var t=this.config.loadEvent;if(this.config.asBlob)r.prototype.load.call(this);else{this.percentComplete=0;var e=this.createVideoElement();e.addEventListener(t,this.onLoadCallback,!0),e.addEventListener("error",this.onErrorCallback,!0),e.src=a(this,this.loader.baseURL),e.load()}}});u.create=function(t,e,i,n,s,r,o){var a=t.systems.game;l(e)&&(i=h(e,"url",[]),n=h(e,"loadEvent","loadeddata"),s=h(e,"asBlob",!1),r=h(e,"noAudio",!1),o=h(e,"xhrSettings"));var c=u.getVideoURL(a,i);if(c)return new u(t,e,c,n,s,r,o)},u.getVideoURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(17),r=i(133),o=i(10),a=i(82),h=i(8),l=i(2),u=i(23),c=i(22),d=i(139),f=new n({Extends:o,initialize:function(t){o.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,this.sceneManager=t.sys.game.scene,h.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(l(i,"baseURL",e.loaderBaseURL)),this.setPath(l(i,"path",e.loaderPath)),this.setPrefix(l(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=l(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=d(l(i,"responseType",e.loaderResponseType),l(i,"async",e.loaderAsync),l(i,"user",e.loaderUser),l(i,"password",e.loaderPassword),l(i,"timeout",e.loaderTimeout),l(i,"withCredentials",e.loaderWithCredentials)),this.crossOrigin=l(i,"crossOrigin",e.loaderCrossOrigin),this.totalToLoad=0,this.progress=0,this.list=new r,this.inflight=new r,this.queue=new r,this._deleteQueue=new r,this.totalFailed=0,this.totalComplete=0,this.state=s.LOADER_IDLE,this.multiKeyIndex=0,t.sys.events.once(c.BOOT,this.boot,this),t.sys.events.on(c.START,this.pluginStart,this)},boot:function(){this.systems.events.once(c.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(c.SHUTDOWN,this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e0},isLoading:function(){return this.state===s.LOADER_LOADING||this.state===s.LOADER_PROCESSING},isReady:function(){return this.state===s.LOADER_IDLE||this.state===s.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=s.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(c.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(a.PROGRESS,this.progress)},update:function(){this.state===s.LOADER_LOADING&&this.list.size>0&&this.inflight.size * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(50),s=i(18),r={ArcadePhysics:i(1260),Body:i(465),Collider:i(466),Components:i(217),Events:i(218),Factory:i(459),Group:i(461),Image:i(460),Sprite:i(140),StaticBody:i(471),StaticGroup:i(462),World:i(464)};r=s(!1,r,n),t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(35),r=i(53),o=i(320),a=i(459),h=i(2),l=i(126),u=i(1273),c=i(463),d=i(23),f=i(22),p=i(3),g=i(464),v=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,t.sys.events.once(f.BOOT,this.boot,this),t.sys.events.on(f.START,this.start,this)},boot:function(){this.world=new g(this.scene,this.config),this.add=new a(this.world),this.systems.events.once(f.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new g(this.scene,this.config),this.add=new a(this.world));var t=this.systems.events;t.on(f.UPDATE,this.world.update,this.world),t.on(f.POST_UPDATE,this.world.postUpdate,this.world),t.once(f.SHUTDOWN,this.shutdown,this)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return l(h(e,"arcade",{}),h(t,"arcade",{}))},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.world.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.world.collideObjects(t,e,i,n,s,!1)},collideTiles:function(t,e,i,n,s){return this.world.collideTiles(t,e,i,n,s)},overlapTiles:function(t,e,i,n,s){return this.world.overlapTiles(t,e,i,n,s)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(t,e,i,n,s,r){void 0===n&&(n=60);var o=Math.atan2(i-t.y,e-t.x);return t.body.acceleration.setToPolar(o,n),void 0!==s&&void 0!==r&&t.body.maxVelocity.set(s,r),o},accelerateToObject:function(t,e,i,n,s){return this.accelerateTo(t,e.x,e.y,i,n,s)},closest:function(t,e){e||(e=this.world.bodies.entries);for(var i=Number.MAX_VALUE,n=null,s=t.x,r=t.y,a=e.length,h=0;hi&&(n=l,i=c)}}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var o=Math.atan2(i-t.y,e-t.x);return s>0&&(n=r(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(o,n),o},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(s(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(t,e)},overlapRect:function(t,e,i,n,s,r){return c(this.world,t,e,i,n,s,r)},overlapCirc:function(t,e,i,n,s){return u(this.world,t,e,i,n,s)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(f.UPDATE,this.world.update,this.world),t.off(f.POST_UPDATE,this.world.postUpdate,this.world),t.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",v,"arcadePhysics"),t.exports=v},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i){return this.body.setCollideWorldBounds(t,e,i),this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},function(t,e){t.exports={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}}},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){t.exports={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}}},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},function(t,e,i){var n=i(463),s=i(65),r=i(205),o=i(206);t.exports=function(t,e,i,a,h,l){var u=n(t,e-a,i-a,2*a,2*a,h,l);if(0===u.length)return u;for(var c=new s(e,i,a),d=new s,f=[],p=0;p * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="collide"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="overlap"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pause"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="resume"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="tilecollide"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="tileoverlap"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="worldbounds"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="worldstep"},function(t,e){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1284),s=i(1286),r=i(470);t.exports=function(t,e,i,o,a,h,l){var u=o.left,c=o.top,d=o.right,f=o.bottom,p=i.faceLeft||i.faceRight,g=i.faceTop||i.faceBottom;if(l||(p=!0,g=!0),!p&&!g)return!1;var v=0,m=0,y=0,x=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX() * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1285);t.exports=function(t,e,i,s,r,o){var a=0,h=e.faceLeft,l=e.faceRight,u=e.collideLeft,c=e.collideRight;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaX()<0&&c&&t.checkCollision.left?l&&t.x0&&u&&t.checkCollision.right&&h&&t.right>i&&(a=t.right-i)>r&&(a=0),0!==a&&(t.customSeparateX?t.overlapX=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1287);t.exports=function(t,e,i,s,r,o){var a=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(a=t.bottom-i)>r&&(a=0),0!==a&&(t.customSeparateY?t.overlapY=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(467);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.x=u+h*t.bounce.x,e.velocity.x=u+l*e.bounce.x}return!0}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(468);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.y=u+h*t.bounce.y,e.velocity.y=u+l*e.bounce.y}return!0}},function(t,e,i){var n={};t.exports=n;var s=i(148),r=i(219),o=i(38),a=i(62),h=i(109);n.stack=function(t,e,i,n,r,o,h){for(var l,u=s.create({label:"Stack"}),c=t,d=e,f=0,p=0;pg&&(g=y),a.translate(m,{x:.5*x,y:.5*y}),c=m.bounds.max.x+r,s.addBody(u,m),l=m,f+=1}else c+=r}d+=g+o,c=t}return u},n.chain=function(t,e,i,n,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=f[l-1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),n&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*f,y:0}),h(t+(u?o*f:0)+o*r,n,o,l,u,c)}))},n.newtonsCradle=function(t,e,i,n,o){for(var a=s.create({label:"Newtons Cradle"}),l=0;l1;if(!d||t!=d.x||e!=d.y){d&&n?(f=d.x,p=d.y):(f=0,p=0);var s={x:f+t,y:p+e};!n&&d||(d=s),g.push(s),m=f+t,y=p+e}},T=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":m=t.x,y=t.y;break;case"H":m=t.x;break;case"V":y=t.y}x(m,y,t.pathSegType)}};for(n._svgPathToAbsolute(t),o=t.getTotalLength(),l=[],i=0;i * @author Richard Davey * @copyright 2018 CodeAndWeb GmbH * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(109),s=i(62),r=i(38),o=i(2),a=i(86),h={parseBody:function(t,e,i,n){void 0===n&&(n={});for(var a=o(i,"fixtures",[]),h=[],l=0;l * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(109),s=i(62),r={parseBody:function(t,e,i,r){var o;void 0===r&&(r={});var a=i.vertices;if(1===a.length)r.vertices=a[0],o=s.create(r),n.flagCoincidentParts(o.parts);else{for(var h=[],l=0;l * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={AFTER_ADD:i(1404),AFTER_REMOVE:i(1405),AFTER_UPDATE:i(1406),BEFORE_ADD:i(1407),BEFORE_REMOVE:i(1408),BEFORE_UPDATE:i(1409),COLLISION_ACTIVE:i(1410),COLLISION_END:i(1411),COLLISION_START:i(1412),DRAG_END:i(1413),DRAG:i(1414),DRAG_START:i(1415),PAUSE:i(1416),RESUME:i(1417),SLEEP_END:i(1418),SLEEP_START:i(1419)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(109),s=i(62),r=i(0),o=i(513),a=i(10),h=i(2),l=i(108),u=i(86),c=new r({Extends:a,Mixins:[o.Bounce,o.Collision,o.Friction,o.Gravity,o.Mass,o.Sensor,o.Sleep,o.Static],initialize:function(t,e,i){a.call(this),this.tile=e,this.world=t,e.physics.matterBody&&e.physics.matterBody.destroy(),e.physics.matterBody=this;var n=h(i,"body",null),s=h(i,"addToWorld",!0);if(n)this.setBody(n,s);else{var r=e.getCollisionGroup();h(r,"objects",[]).length>0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),l(t,"isStatic")||(t.isStatic=!0),l(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),l(t,"isStatic")||(t.isStatic=!0),l(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),a=this.tile.getCollisionGroup(),c=h(a,"objects",[]),d=[],f=0;f1&&(t.parts=d,this.setBody(s.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});t.exports=c},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1386);n.Body=i(62),n.Composite=i(148),n.World=i(1298),n.Detector=i(514),n.Grid=i(1299),n.Pairs=i(1300),n.Pair=i(472),n.Query=i(1387),n.Resolver=i(1301),n.SAT=i(515),n.Constraint=i(219),n.Common=i(38),n.Engine=i(1388),n.Events=i(240),n.Sleeping=i(239),n.Plugin=i(1297),n.Bodies=i(109),n.Composites=i(1290),n.Axes=i(512),n.Bounds=i(100),n.Svg=i(1291),n.Vector=i(99),n.Vertices=i(86),n.World.add=n.Composite.add,n.World.remove=n.Composite.remove,n.World.addComposite=n.Composite.addComposite,n.World.addBody=n.Composite.addBody,n.World.addConstraint=n.Composite.addConstraint,n.World.clear=n.Composite.clear,t.exports=n},function(t,e,i){var n={};t.exports=n;var s=i(38);n._registry={},n.register=function(t){if(n.isPlugin(t)||s.warn("Plugin.register:",n.toString(t),"does not implement all required fields."),t.name in n._registry){var e=n._registry[t.name],i=n.versionParse(t.version).number,r=n.versionParse(e.version).number;i>r?(s.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=n.dependencies(t),r=s.topologicalSort(i),o=[],a=0;a0&&!h.silent&&s.info(o.join(" "))}else s.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.")},n.dependencies=function(t,e){var i=n.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=n.resolve(t)||t,e[r]=s.map(t.uses||[],(function(e){n.isPlugin(e)&&n.register(e);var r=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,r.range)?(s.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(r),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(s.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),r.name}));for(var o=0;o=s[2];if("^"===i.operator)return s[0]>0?o[0]===s[0]&&r.number>=i.number:s[1]>0?o[1]===s[1]&&o[2]>=s[2]:o[2]===s[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(148),r=(i(219),i(38));n.create=function(t){var e=s.create();return r.extend(e,{label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}},t)}},function(t,e,i){var n={};t.exports=n;var s=i(472),r=i(514),o=i(38);n.create=function(t){var e={controller:n,detector:r.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return o.extend(e,t)},n.update=function(t,e,i,s){var r,o,a,h,l,u=i.world,c=t.buckets,d=!1,f=i.metrics;for(f.broadphaseTests=0,r=0;ru.bounds.max.x||p.bounds.max.yu.bounds.max.y)){var g=n._getRegion(t,p);if(!p.region||g.id!==p.region.id||s){f.broadphaseTests+=1,p.region&&!s||(p.region=g);var v=n._regionUnion(g,p.region);for(o=v.startCol;o<=v.endCol;o++)for(a=v.startRow;a<=v.endRow;a++){h=c[l=n._getBucketId(o,a)];var m=o>=g.startCol&&o<=g.endCol&&a>=g.startRow&&a<=g.endRow,y=o>=p.region.startCol&&o<=p.region.endCol&&a>=p.region.startRow&&a<=p.region.endRow;!m&&y&&y&&h&&n._bucketRemoveBody(t,h,p),(p.region===g||m&&!y||s)&&(h||(h=n._createBucket(c,l)),n._bucketAddBody(t,h,p))}p.region=g,d=!0}}}d&&(t.pairsList=n._createActivePairsList(t))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},n._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),s=Math.max(t.endCol,e.endCol),r=Math.min(t.startRow,e.startRow),o=Math.max(t.endRow,e.endRow);return n._createRegion(i,s,r,o)},n._getRegion=function(t,e){var i=e.bounds,s=Math.floor(i.min.x/t.bucketWidth),r=Math.floor(i.max.x/t.bucketWidth),o=Math.floor(i.min.y/t.bucketHeight),a=Math.floor(i.max.y/t.bucketHeight);return n._createRegion(s,r,o,a)},n._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},n._getBucketId=function(t,e){return"C"+t+"R"+e},n._createBucket=function(t,e){return t[e]=[]},n._bucketAddBody=function(t,e,i){for(var n=0;n0?n.push(i):delete t.pairs[e[s]];return n}},function(t,e,i){var n={};t.exports=n;var s=i(472),r=i(38);n._pairMaxIdleLife=1e3,n.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,r,o,a,h=t.list,l=t.table,u=t.collisionStart,c=t.collisionEnd,d=t.collisionActive;for(u.length=0,c.length=0,d.length=0,a=0;an._pairMaxIdleLife&&l.push(o);for(o=0;of.friction*f.frictionStatic*k*i&&(I=R,F=o.clamp(f.friction*L*i,-I,I));var B=r.cross(S,m),N=r.cross(_,m),Y=T/(g.inverseMass+v.inverseMass+g.inverseInertia*B*B+v.inverseInertia*N*N);if(D*=Y,F*=Y,P<0&&P*P>n._restingThresh*i)b.normalImpulse=0;else{var X=b.normalImpulse;b.normalImpulse=Math.min(b.normalImpulse+D,0),D=b.normalImpulse-X}if(O*O>n._restingThreshTangent*i)b.tangentImpulse=0;else{var U=b.tangentImpulse;b.tangentImpulse=o.clamp(b.tangentImpulse+F,-I,I),F=b.tangentImpulse-U}s.x=m.x*D+y.x*F,s.y=m.y*D+y.y*F,g.isStatic||g.isSleeping||(g.positionPrev.x+=s.x*g.inverseMass,g.positionPrev.y+=s.y*g.inverseMass,g.anglePrev+=r.cross(S,s)*g.inverseInertia),v.isStatic||v.isSleeping||(v.positionPrev.x-=s.x*v.inverseMass,v.positionPrev.y-=s.y*v.inverseMass,v.anglePrev-=r.cross(_,s)*v.inverseInertia)}}}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={BasePlugin:i(473),DefaultPlugins:i(175),PluginCache:i(23),PluginManager:i(369),ScenePlugin:i(1303)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ var n=i(473),s=i(0),r=i(22),o=new s({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(18),s=i(177),r={Center:i(358),Events:i(92),Orientation:i(359),ScaleManager:i(370),ScaleModes:i(360),Zoom:i(361)};r=n(!1,r,s.CENTER),r=n(!1,r,s.ORIENTATION),r=n(!1,r,s.SCALE_MODE),r=n(!1,r,s.ZOOM),t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(125),s=i(18),r={Events:i(22),SceneManager:i(372),ScenePlugin:i(1306),Settings:i(374),Systems:i(180)};r=s(!1,r,n),t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(19),s=i(0),r=i(22),o=i(2),a=i(23),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=o(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=o(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=o(t,"sleep",!1),this._willRemove=o(t,"remove",!1);var s=o(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=o(t,"onUpdateScope",this.scene));var a=o(t,"allowInput",!1);this.settings.transitionAllowInput=a;var h=i.sys.settings;return h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=n,h.transitionAllowInput=a,o(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):o(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(o(t,"data")):this.manager.start(e,o(t,"data")),this.systems.events.emit(r.TRANSITION_OUT,i,n),this.systems.events.on(r.UPDATE,this.step,this),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=n(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(r.UPDATE,this.step,this),t.events.emit(r.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.POST_UPDATE,this.step,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={List:i(129),Map:i(162),ProcessQueue:i(186),RTree:i(469),Set:i(133),Size:i(371)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(18),s=i(1309),r={CanvasTexture:i(376),Events:i(121),FilterMode:s,Frame:i(94),Parsers:i(378),Texture:i(182),TextureManager:i(375),TextureSource:i(377)};r=n(!1,r,s),t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Components:i(141),Parsers:i(1340),Formats:i(32),ImageCollection:i(484),ParseToTilemap:i(227),Tile:i(74),Tilemap:i(493),TilemapCreator:i(1349),TilemapFactory:i(1350),Tileset:i(104),LayerData:i(102),MapData:i(103),ObjectLayer:i(487),DynamicTilemapLayer:i(494),StaticTilemapLayer:i(495)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(24),s=i(51);t.exports=function(t,e,i,r,o,a,h,l){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var u=n(t,e,i,r,null,l),c=o-t,d=a-e,f=0;f=0&&p=0&&g * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(143),s=i(144),r=i(24),o=i(474);t.exports=function(t,e,i,a,h,l){void 0===i&&(i={}),Array.isArray(t)||(t=[t]);var u=l.tilemapLayer;void 0===a&&(a=u.scene),void 0===h&&(h=a.cameras.main);var c,d=r(0,0,l.width,l.height,null,l),f=[];for(c=0;c * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(93),s=i(329);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o,a,h,l=t.tilemapLayer.tilemap,u=t.tilemapLayer,c=t.data,d=t.width,f=t.height,p=Math.floor(l.tileWidth*u.scaleX),g=Math.floor(l.tileHeight*u.scaleY),v=0,m=d,y=0,x=f;if(!u.skipCull&&1===u.scrollFactorX&&1===u.scrollFactorY){var T=n(e.worldView.x-u.x,p,0,!0)-u.cullPaddingX,w=s(e.worldView.right-u.x,p,0,!0)+u.cullPaddingX,b=n(e.worldView.y-u.y,g,0,!0)-u.cullPaddingY,E=s(e.worldView.bottom-u.y,g,0,!0)+u.cullPaddingY;v=Math.max(0,T),m=Math.min(d,w),y=Math.max(0,b),x=Math.min(f,E)}if(0===r)for(a=y;a=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);else if(2===r)for(a=x;a>=y;a--)for(o=v;c[a]&&o=y;a--)for(o=m;c[a]&&o>=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);return u.tilesDrawn=i.length,u.tilesTotal=d*f,i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(24),s=i(51),r=i(73);t.exports=function(t,e,i,o,a,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),c=n(e,i,o,a,null,l),d=0;d * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(24);t.exports=function(t,e,i,s,r,o,a,h){return n(i,s,r,o,a,h).filter(t,e)}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=!1);var s,r,o,a=0;if(i){for(r=n.height-1;r>=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;r * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(24);t.exports=function(t,e,i,s,r,o,a,h){return n(i,s,r,o,a,h).find(t,e)||null}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(24);t.exports=function(t,e,i,s,r,o,a,h){n(i,s,r,o,a,h).forEach(t,e)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(142),s=i(63),r=i(64);t.exports=function(t,e,i,o,a){var h=s(t,!0,o,a),l=r(e,!0,o,a);return n(h,l,i,a)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(429),s=i(24),r=i(430),o=i(1),a=i(143),h=i(144),l=i(63),u=i(64),c=function(t,e){return r.RectangleToTriangle(e,t)};t.exports=function(t,e,i,d){if(void 0===t)return[];var f=o;t instanceof n.Circle?f=r.CircleToRectangle:t instanceof n.Rectangle?f=r.RectangleToRectangle:t instanceof n.Triangle?f=c:t instanceof n.Line&&(f=r.LineToRectangle);var p=l(t.left,!0,i,d),g=u(t.top,!0,i,d),v=Math.ceil(l(t.right,!1,i,d)),m=Math.ceil(u(t.bottom,!1,i,d)),y=Math.max(v-p,1),x=Math.max(m-g,1),T=s(p,g,y,x,e,d),w=d.tileWidth,b=d.tileHeight;d.tilemapLayer&&(w*=d.tilemapLayer.scaleX,b*=d.tilemapLayer.scaleY);for(var E=[],S=new n.Rectangle(0,0,w,b),_=0;_ * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(24),s=i(63),r=i(64);t.exports=function(t,e,i,o,a,h,l){var u=s(t,!0,h,l),c=r(e,!0,h,l),d=Math.ceil(s(t+i,!1,h,l)),f=Math.ceil(r(e+o,!1,h,l));return n(u,c,d-u,f-c,a,l)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(475),s=i(63),r=i(64);t.exports=function(t,e,i,o){var a=s(t,!0,i,o),h=r(e,!0,i,o);return n(a,h,o)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(221),s=i(63),r=i(64);t.exports=function(t,e,i,o,a,h){var l=s(e,!0,a,h),u=r(i,!0,a,h);return n(t,l,u,o,h)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(51),s=i(221);t.exports=function(t,e,i,r,o){if(!Array.isArray(t))return null;void 0===r&&(r=!0),Array.isArray(t[0])||(t=[t]);for(var a=t.length,h=t[0].length,l=0;l * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(24),s=i(185);t.exports=function(t,e,i,r,o,a){var h,l=n(t,e,i,r,null,a);if(void 0===o)for(o=[],h=0;h * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(476),s=i(63),r=i(64);t.exports=function(t,e,i,o,a,h){var l=s(t,!0,a,h),u=r(e,!0,a,h);return n(l,u,i,o,h)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(24),s=i(353),r=new s(105,210,231,150),o=new s(243,134,48,200),a=new s(40,39,37,150);t.exports=function(t,e,i){void 0===e&&(e={});var s=void 0!==e.tileColor?e.tileColor:r,h=void 0!==e.collidingTileColor?e.collidingTileColor:o,l=void 0!==e.faceColor?e.faceColor:a,u=n(0,0,i.width,i.height,null,i);t.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),t.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var c=0;c * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(73),s=i(51),r=i(222);t.exports=function(t,e,i,o,a){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]),void 0===a&&(a=!0);for(var h=0;h * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(73),s=i(51),r=i(222);t.exports=function(t,e,i,o,a,h){if(void 0===i&&(i=!0),void 0===o&&(o=!0),void 0===h&&(h=!0),!(t>e)){for(var l=t;l<=e;l++)r(l,i,a);if(h)for(var u=0;u=t&&d.index<=e&&n(d,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(73),s=i(51),r=i(222);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(73),s=i(51),r=i(108);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var a=0;a * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(73),s=i(51);t.exports=function(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=!0);for(var r=0;r0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(24);t.exports=function(t,e,i,s,r,o,a){for(var h=n(t,e,i,s,null,a),l=0;l * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(24),s=i(114);t.exports=function(t,e,i,r,o){var a=n(t,e,i,r,null,o),h=a.map((function(t){return t.index}));s(h);for(var l=0;l * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(24);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(143),s=i(144),r=i(3);t.exports=function(t,e,i,o,a){return void 0===i&&(i=new r(0,0)),i.x=n(t,o,a),i.y=s(e,o,a),i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(24);t.exports=function(t,e,i,s,r,o){if(void 0!==r){var a,h=n(t,e,i,s,null,o),l=0;for(a=0;a * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(63),s=i(64),r=i(3);t.exports=function(t,e,i,o,a,h){return void 0===o&&(o=new r(0,0)),o.x=n(t,i,a,h),o.y=s(e,i,a,h),o}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Parse:i(477),Parse2DArray:i(223),ParseCSV:i(478),Impact:i(1341),Tiled:i(1342)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={ParseTileLayers:i(491),ParseTilesets:i(492),ParseWeltmeister:i(490)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={AssignTileProperties:i(489),Base64Decode:i(481),BuildTilesetIndex:i(488),ParseGID:i(224),ParseImageLayers:i(482),ParseJSONTiled:i(479),ParseObject:i(226),ParseObjectLayers:i(486),ParseTileLayers:i(480),ParseTilesets:i(483)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(1344),s=i(1345),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(9);t.exports=function(t,e,i,s){e.cull(s);var r=e.culledTiles,o=r.length,a=s.alpha*e.alpha;if(!(0===o||a<=0))for(var h=e.gidMap,l=e.pipeline,u=n.getTintAppendFloatAlphaAndSwap,c=e.scrollFactorX,d=e.scrollFactorY,f=e.x,p=e.y,g=e.scaleX,v=e.scaleY,m=e.tileset,y=0;y1||e.scaleY>1)&&(u.imageSmoothingEnabled=!1);for(var f=0;f * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);n=i(1347),s=i(1348),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n){var s=e.tileset,r=e.pipeline,o=r.vertexBuffer;t.setPipeline(r),r.modelIdentity(),r.modelTranslate(e.x-n.scrollX*e.scrollFactorX,e.y-n.scrollY*e.scrollFactorY,0),r.modelScale(e.scaleX,e.scaleY,1),r.viewLoad2D(n.matrix.matrix);for(var a=0;a0&&(t.currentPipeline&&t.currentPipeline.vertexCount>0&&t.flush(),r.vertexBuffer=e.vertexBuffer[a],t.setPipeline(r),t.setTexture2D(s[a].glTexture,0),t.gl.drawArrays(r.topology,0,e.vertexCount[a]));r.vertexBuffer=o,r.viewIdentity(),r.modelIdentity()}},function(t,e){t.exports=function(t,e,i,n,s){e.cull(n);var r=e.culledTiles,o=r.length;if(0!==o){var a=t._tempMatrix1,h=t._tempMatrix2,l=t._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(n.matrix);var u=t.currentContext,c=e.gidMap;u.save(),s?(a.multiplyWithOffset(s,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l),l.copyToContext(u)):(h.e-=n.scrollX*e.scrollFactorX,h.f-=n.scrollY*e.scrollFactorY,h.copyToContext(u));var d=n.alpha*e.alpha;(!t.antialias||e.scaleX>1||e.scaleY>1)&&(u.imageSmoothingEnabled=!1);for(var f=0;f * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(16),s=i(227);n.register("tilemap",(function(t){var e=void 0!==t?t:{};return s(this.scene,e.key,e.tileWidth,e.tileHeight,e.width,e.height,e.data,e.insertNull)}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5),s=i(227);n.register("tilemap",(function(t,e,i,n,r,o,a){return null===t&&(t=void 0),null===e&&(e=void 0),null===i&&(i=void 0),null===n&&(n=void 0),null===r&&(r=void 0),s(this.scene,t,e,i,n,r,o,a)}))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Clock:i(1352),TimerEvent:i(496)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(23),r=i(22),o=i(496),a=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.now=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(r.PRE_UPDATE,this.preUpdate,this),t.on(r.UPDATE,this.update,this),t.once(r.SHUTDOWN,this.shutdown,this)},addEvent:function(t){var e=new o(t);return this._pendingInsertion.push(e),e},delayedCall:function(t,e,i,n){return this.addEvent({delay:t,callback:e,args:i,callbackScope:n})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeAllEvents:function(){return this._pendingRemoval=this._pendingRemoval.concat(this._active),this},preUpdate:function(){var t=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){var i,n;for(i=0;i-1&&this._active.splice(s,1),n.destroy()}for(i=0;i=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(89),s=i(18),r={Builders:i(1354),Events:i(232),TweenManager:i(1369),Tween:i(231),TweenData:i(233),Timeline:i(502)};r=s(!1,r,n),t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={GetBoolean:i(88),GetEaseFunction:i(69),GetNewValue:i(145),GetProps:i(497),GetTargets:i(228),GetTweens:i(498),GetValueOp:i(229),NumberTweenBuilder:i(499),StaggerBuilder:i(500),TimelineBuilder:i(501),TweenBuilder:i(146)}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","loop","loopDelay","offset","onActive","onActiveParams","onActiveScope","onComplete","onCompleteParams","onCompleteScope","onLoop","onLoopParams","onLoopScope","onRepeat","onRepeatParams","onRepeatScope","onStart","onStartParams","onStartScope","onUpdate","onUpdateParams","onUpdateScope","onYoyo","onYoyoParams","onYoyoScope","paused","props","repeat","repeatDelay","targets","useFrames","yoyo"]},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="complete"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="loop"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pause"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="resume"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="start"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="update"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="active"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="complete"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="loop"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="repeat"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="start"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="update"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="yoyo"},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(123),s=i(0),r=i(499),o=i(23),a=i(22),h=i(500),l=i(501),u=i(89),c=i(146),d=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.timeScale=1,this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,t.sys.events.once(a.BOOT,this.boot,this),t.sys.events.on(a.START,this.start,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(a.PRE_UPDATE,this.preUpdate,this),t.on(a.UPDATE,this.update,this),t.once(a.SHUTDOWN,this.shutdown,this),this.timeScale=1},createTimeline:function(t){return l(this,t)},timeline:function(t){var e=l(this,t);return e.paused||(this._add.push(e),this._toProcess++),e},create:function(t){return c(this,t)},add:function(t){var e=c(this,t);return this._add.push(e),this._toProcess++,e},existing:function(t){return this._add.push(t),this._toProcess++,this},addCounter:function(t){var e=r(this,t);return this._add.push(e),this._toProcess++,e},stagger:function(t,e){return h(t,e)},preUpdate:function(){if(0!==this._toProcess){var t,e,i=this._destroy,n=this._active,s=this._pending;for(t=0;t-1&&(e.state=u.REMOVED,s.splice(r,1)):(e.state=u.REMOVED,n.splice(r,1))}for(i.length=0,i=this._add,t=0;t * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Array:i(183),Base64:i(1371),Objects:i(1373),String:i(1377)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={ArrayBufferToBase64:i(1372),Base64ToArrayBuffer:i(387)}},function(t,e){ /** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t.exports=function(t,e){for(var n=new Uint8Array(t),s=n.length,r=e?"data:"+e+";base64,":"",o=0;o>2],r+=i[(3&n[o])<<4|n[o+1]>>4],r+=i[(15&n[o+1])<<2|n[o+2]>>6],r+=i[63&n[o+2]];return s%3==2?r=r.substring(0,r.length-1)+"=":s%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Clone:i(67),Extend:i(18),GetAdvancedValue:i(14),GetFastValue:i(2),GetMinMaxValue:i(1374),GetValue:i(6),HasAll:i(1375),HasAny:i(406),HasValue:i(108),IsPlainObject:i(7),Merge:i(126),MergeRight:i(1376),Pick:i(485),SetValue:i(426)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(6),s=i(19);t.exports=function(t,e,i,r,o){void 0===o&&(o=i);var a=n(t,e,o);return s(a,i,r)}},function(t,e){t.exports=function(t,e){for(var i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(67);t.exports=function(t,e){var i=n(t);for(var s in e)i.hasOwnProperty(s)&&(i[s]=e[s]);return i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Format:i(1378),Pad:i(163),Reverse:i(1379),UppercaseFirst:i(181),UUID:i(196)}},function(t,e){t.exports=function(t,e){return t.replace(/%([0-9]+)/g,(function(t,i){return e[Number(i)-1]}))}},function(t,e){t.exports=function(t){return t.split("").reverse().join("")}},function(t,e,i){ /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={SoundManagerCreator:i(379),Events:i(59),BaseSound:i(128),BaseSoundManager:i(127),WebAudioSound:i(388),WebAudioSoundManager:i(386),HTML5AudioSound:i(383),HTML5AudioSoundManager:i(380),NoAudioSound:i(385),NoAudioSoundManager:i(384)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(3),r=new n({initialize:function(){this.boundsCenter=new s,this.centerDiff=new s},parseBody:function(t){if(!(t=t.hasOwnProperty("body")?t.body:t).hasOwnProperty("bounds")||!t.hasOwnProperty("centerOfMass"))return!1;var e=this.boundsCenter,i=this.centerDiff,n=t.bounds.max.x-t.bounds.min.x,s=t.bounds.max.y-t.bounds.min.y,r=n*t.centerOfMass.x,o=s*t.centerOfMass.y;return e.set(n/2,s/2),i.set(r-e.x,o-e.y),!0},getTopLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+n.x+r.x,i+n.y+r.y)}return!1},getTopCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+r.x,i+n.y+r.y)}return!1},getTopRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e-(n.x-r.x),i+n.y+r.y)}return!1},getLeftCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+n.x+r.x,i+r.y)}return!1},getCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.centerDiff;return new s(e+n.x,i+n.y)}return!1},getRightCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e-(n.x-r.x),i+r.y)}return!1},getBottomLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+n.x+r.x,i-(n.y-r.y))}return!1},getBottomCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+r.x,i-(n.y-r.y))}return!1},getBottomRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e-(n.x-r.x),i-(n.y-r.y))}return!1}});t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(109),s=i(0),r=i(1290),o=i(219),a=i(1291),h=i(1393),l=i(1384),u=i(1385),c=i(1295),d=i(1292),f=i(1293),p=i(1422),g=i(86),v=new s({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},rectangle:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return this.world.add(o),o},trapezoid:function(t,e,i,s,r,o){var a=n.trapezoid(t,e,i,s,r,o);return this.world.add(a),a},circle:function(t,e,i,s,r){var o=n.circle(t,e,i,s,r);return this.world.add(o),o},polygon:function(t,e,i,s,r){var o=n.polygon(t,e,i,s,r);return this.world.add(o),o},fromVertices:function(t,e,i,s,r,o,a){"string"==typeof i&&(i=g.fromPath(i));var h=n.fromVertices(t,e,i,s,r,o,a);return this.world.add(h),h},fromPhysicsEditor:function(t,e,i,n,s){void 0===s&&(s=!0);var r=d.parseBody(t,e,i,n);return s&&!this.world.has(r)&&this.world.add(r),r},fromSVG:function(t,e,i,s,r,o){void 0===s&&(s=1),void 0===r&&(r={}),void 0===o&&(o=!0);for(var h=i.getElementsByTagName("path"),l=[],u=0;u=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function r(t,e,i){return s(t,e,i)>0}function o(t,e,i){return s(t,e,i)>=0}function a(t,e,i){return s(t,e,i)<0}function h(t,e,i){return s(t,e,i)<=0} /** * @author Stefan Hedman (http://steffe.se) * @license {@link https://opensource.org/licenses/MIT|MIT License} */t.exports={decomp:function(t){var e=function t(e){for(var i=[],n=[],s=[],r=[],o=Number.MAX_VALUE,a=0;a0?function t(e,i){if(0===i.length)return[e];if(i instanceof Array&&i.length&&i[0]instanceof Array&&2===i[0].length&&i[0][0]instanceof Array){for(var n=[e],s=0;su)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var L=0;L_&&(_+=e.length),S=Number.MAX_VALUE,_3&&n>=0;--n)c(f(t,n-1),f(t,n),f(t,n+1),e)&&(t.splice(n%t.length,1),i++);return i},removeDuplicatePoints:function(t,e){for(var i=t.length-1;i>=1;--i)for(var n=t[i],s=i-1;s>=0;--s)E(n,t[s],e)&&t.splice(i,1)},makeCCW:function(t){for(var e=0,i=t,n=1;ni[e][0])&&(e=n);return!r(f(t,e-1),f(t,e),f(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var l=[],u=[];function c(t,e,i,n){if(n){var r=l,o=u;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],h=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(h*c)) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(513),r=i(13),o=i(2),a=i(107),h=i(156),l=i(3),u=new n({Extends:a,Mixins:[s.Bounce,s.Collision,s.Force,s.Friction,s.Gravity,s.Mass,s.Sensor,s.SetBody,s.Sleep,s.Static,s.Transform,s.Velocity,h],initialize:function(t,e,i,n,s,a){r.call(this,t.scene,"Image"),this.setTexture(n,s),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new l(e,i);var h=o(a,"shape",null);h?this.setBody(h,a):this.setRectangle(this.width,this.height,a),this.setPosition(e,i),this.initPipeline("TextureTintPipeline")}});t.exports=u},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(503),s=i(0),r=i(513),o=i(13),a=i(2),h=i(156),l=i(75),u=i(3),c=new s({Extends:l,Mixins:[r.Bounce,r.Collision,r.Force,r.Friction,r.Gravity,r.Mass,r.Sensor,r.SetBody,r.Sleep,r.Static,r.Transform,r.Velocity,h],initialize:function(t,e,i,s,r,h){o.call(this,t.scene,"Sprite"),this.anims=new n(this),this.setTexture(s,r),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new u(e,i);var l=a(h,"shape",null);l?this.setBody(l,h):this.setRectangle(this.width,this.height,h),this.setPosition(e,i),this.initPipeline("TextureTintPipeline")}});t.exports=c},function(t,e,i){var n={};t.exports=n;var s=i(1297),r=i(38);n.name="matter-js",n.version="0.14.2",n.uses=[],n.used=[],n.use=function(){s.use(n,Array.prototype.slice.call(arguments))},n.before=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathBefore(n,t,e)},n.after=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathAfter(n,t,e)}},function(t,e,i){var n={};t.exports=n;var s=i(99),r=i(515),o=i(100),a=i(109),h=i(86);n.collides=function(t,e){for(var i=[],n=0;n0&&u.trigger(t,"collisionStart",{pairs:T.collisionStart}),o.preSolvePosition(T.list),s=0;s0&&u.trigger(t,"collisionActive",{pairs:T.collisionActive}),T.collisionEnd.length>0&&u.trigger(t,"collisionEnd",{pairs:T.collisionEnd}),h.update(t.metrics,t),n._bodiesClearForces(m),u.trigger(t,"afterUpdate",v),t},n.merge=function(t,e){if(f.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=c.allBodies(t.world),s=0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(109),s=i(62),r=i(0),o=i(38),a=i(148),h=i(1388),l=i(10),u=i(1294),c=i(2),d=i(6),f=i(62),p=i(240),g=i(1295),v=i(1298),m=i(99),y=new r({Extends:l,initialize:function(t,e){l.call(this),this.scene=t,this.engine=h.create(e),this.localWorld=this.engine.world;var i=d(e,"gravity",null);i?this.setGravity(i.x,i.y,i.scale):!1===i&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=d(e,"enabled",!0),this.correction=d(e,"correction",1),this.getDelta=d(e,"getDelta",this.update60Hz);var n=c(e,"runner",{}),s=c(n,"fps",!1),r=c(n,"fps",60),o=c(n,"delta",1e3/r),a=c(n,"deltaMin",1e3/r),u=c(n,"deltaMax",1e3/(.5*r));s||(r=1e3/o),this.runner={fps:r,correction:c(n,"correction",1),deltaSampleSize:c(n,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:c(n,"isFixed",!1),delta:o,deltaMin:a,deltaMax:u},this.autoUpdate=d(e,"autoUpdate",!0);var f=d(e,"debug",!1);if(this.drawDebug="object"==typeof f||f,this.debugGraphic,this.debugConfig={showAxes:c(f,"showAxes",!1),showAngleIndicator:c(f,"showAngleIndicator",!1),angleColor:c(f,"angleColor",15208787),showBroadphase:c(f,"showBroadphase",!1),broadphaseColor:c(f,"broadphaseColor",16757760),showBounds:c(f,"showBounds",!1),boundsColor:c(f,"boundsColor",16777215),showVelocity:c(f,"showVelocity",!1),velocityColor:c(f,"velocityColor",44783),showCollisions:c(f,"showCollisions",!1),collisionColor:c(f,"collisionColor",16094476),showSeparations:c(f,"showSeparations",!1),separationColor:c(f,"separationColor",16753920),showBody:c(f,"showBody",!0),showStaticBody:c(f,"showStaticBody",!0),showInternalEdges:c(f,"showInternalEdges",!1),renderFill:c(f,"renderFill",!1),renderLine:c(f,"renderLine",!0),fillColor:c(f,"fillColor",1075465),fillOpacity:c(f,"fillOpacity",1),lineColor:c(f,"lineColor",2678297),lineOpacity:c(f,"lineOpacity",1),lineThickness:c(f,"lineThickness",1),staticFillColor:c(f,"staticFillColor",857979),staticLineColor:c(f,"staticLineColor",1255396),showSleeping:c(f,"showSleeping",!1),staticBodySleepOpacity:c(f,"staticBodySleepOpacity",.7),sleepFillColor:c(f,"sleepFillColor",4605510),sleepLineColor:c(f,"sleepLineColor",10066585),showSensors:c(f,"showSensors",!0),sensorFillColor:c(f,"sensorFillColor",857979),sensorLineColor:c(f,"sensorLineColor",1255396),showPositions:c(f,"showPositions",!0),positionSize:c(f,"positionSize",4),positionColor:c(f,"positionColor",14697178),showJoint:c(f,"showJoint",!0),jointColor:c(f,"jointColor",14737474),jointLineOpacity:c(f,"jointLineOpacity",1),jointLineThickness:c(f,"jointLineThickness",2),pinSize:c(f,"pinSize",4),pinColor:c(f,"pinColor",4382944),springColor:c(f,"springColor",14697184),anchorColor:c(f,"anchorColor",15724527),anchorSize:c(f,"anchorSize",4),showConvexHulls:c(f,"showConvexHulls",!1),hullColor:c(f,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),c(e,"setBounds",!1)){var p=e.setBounds;if("boolean"==typeof p)this.setBounds();else{var g=c(p,"x",0),v=c(p,"y",0),m=c(p,"width",t.sys.scale.width),y=c(p,"height",t.sys.scale.height),x=c(p,"thickness",64),T=c(p,"left",!0),w=c(p,"right",!0),b=c(p,"top",!0),E=c(p,"bottom",!0);this.setBounds(g,v,m,y,x,T,w,b,E)}}},setCompositeRenderStyle:function(t){var e,i,n,s=t.bodies,r=t.constraints,o=t.composites;for(e=0;e0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_START,e,i,n)})),p.on(e,"collisionActive",(function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_ACTIVE,e,i,n)})),p.on(e,"collisionEnd",(function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_END,e,i,n)}))},setBounds:function(t,e,i,n,s,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===s&&(s=64),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e-s,s,n+2*s),this.updateWall(o,"right",t+i,e-s,s,n+2*s),this.updateWall(a,"top",t,e-s,i,s),this.updateWall(h,"bottom",t,e+n,i,s),this},updateWall:function(t,e,i,n,s,r){var o=this.walls[e];t?(o&&v.remove(this.localWorld,o),i+=s/2,n+=r/2,this.walls[e]=this.create(i,n,s,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&v.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return v.add(this.localWorld,o),o},add:function(t){return v.add(this.localWorld,t),this},remove:function(t,e){Array.isArray(t)||(t=[t]);for(var i=0;in.deltaMax?n.deltaMax:e)/n.delta,n.delta=e),0!==n.timeScalePrev&&(r*=s.timeScale/n.timeScalePrev),0===s.timeScale&&(r=0),n.timeScalePrev=s.timeScale,n.correction=r,n.frameCounter+=1,t-n.counterTimestamp>=1e3&&(n.fps=n.frameCounter*((t-n.counterTimestamp)/1e3),n.counterTimestamp=t,n.frameCounter=0),h.update(i,e,r)}},step:function(t,e){h.update(this.engine,t,e)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){var e=t.hasOwnProperty("body")?t.body:t;return null!==a.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return a.allBodies(this.localWorld)},getAllConstraints:function(){return a.allConstraints(this.localWorld)},getAllComposites:function(){return a.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var t=this.debugConfig,e=this.engine,i=this.debugGraphic,n=a.allBodies(this.localWorld);this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(n,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(n),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(n,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(n,i,t.velocityColor,1,2),t.showSeparations&&this.renderSeparations(e.pairs.list,i,t.separationColor),t.showCollisions&&this.renderCollisions(e.pairs.list,i,t.collisionColor)}},renderGrid:function(t,e,i,n){e.lineStyle(1,i,n);for(var s=o.keys(t.buckets),r=0;r0){var l=h[0].vertex.x,u=h[0].vertex.y;2===h.length&&(l=(h[0].vertex.x+h[1].vertex.x)/2,u=(h[0].vertex.y+h[1].vertex.y)/2),a.bodyB===a.supports[0].body||a.bodyA.isStatic?e.lineBetween(l-8*a.normal.x,u-8*a.normal.y,l,u):e.lineBetween(l+8*a.normal.x,u+8*a.normal.y,l,u)}}return this},renderBodyBounds:function(t,e,i,n){e.lineStyle(1,i,n);for(var s=0;s1?1:0;h1?1:0;a1?1:0;a1&&this.renderConvexHull(g,e,f,y)}}},renderBody:function(t,e,i,n,s,r,o,a){void 0===n&&(n=null),void 0===s&&(s=null),void 0===r&&(r=1),void 0===o&&(o=null),void 0===a&&(a=null);for(var h=this.debugConfig,l=h.sensorFillColor,u=h.sensorLineColor,c=t.parts,d=c.length,f=d>1?1:0;f1){var s=t.vertices;e.lineStyle(n,i),e.beginPath(),e.moveTo(s[0].x,s[0].y);for(var r=1;r0&&(e.fillStyle(a),e.fillCircle(u.x,u.y,h),e.fillCircle(c.x,c.y,h)),this},resetCollisionIDs:function(){return s._nextCollidingGroupId=1,s._nextNonCollidingGroupId=-1,s._nextCategory=1,this},shutdown:function(){p.off(this.engine),this.removeAllListeners(),v.clear(this.localWorld,!1),h.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});t.exports=y},function(t,e,i){(function(e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ i(517);var n=i(33),s=i(18),r={Actions:i(241),Animations:i(637),BlendModes:i(52),Cache:i(638),Cameras:i(641),Core:i(727),Class:i(0),Create:i(788),Curves:i(794),Data:i(797),Display:i(799),DOM:i(816),Events:i(817),Game:i(819),GameObjects:i(912),Geom:i(429),Input:i(1199),Loader:i(1233),Math:i(170),Physics:i(1391),Plugins:i(1302),Renderer:i(1428),Scale:i(1304),ScaleModes:i(234),Scene:i(373),Scenes:i(1305),Structs:i(1307),Textures:i(1308),Tilemaps:i(1310),Time:i(1351),Tweens:i(1353),Utils:i(1370)};r.Sound=i(1380),r=s(!1,r,n),t.exports=r,e.Phaser=r}).call(this,i(516))},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Arcade:i(1259),Matter:i(1392)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={BodyBounds:i(1381),Factory:i(1382),Image:i(1384),Matter:i(1296),MatterPhysics:i(1424),PolyDecomp:i(1383),Sprite:i(1385),TileBody:i(1295),PhysicsEditorParser:i(1292),PhysicsJSONParser:i(1293),World:i(1389)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(513),s=i(2),r=i(3);t.exports=function(t,e,i,o){void 0===i&&(i={}),void 0===o&&(o=!0);var a=e.x,h=e.y;if(e.body={temp:!0,position:{x:a,y:h}},[n.Bounce,n.Collision,n.Force,n.Friction,n.Gravity,n.Mass,n.Sensor,n.SetBody,n.Sleep,n.Static,n.Transform,n.Velocity].forEach((function(t){for(var i in t)(n=t[i]).get&&"function"==typeof n.get||n.set&&"function"==typeof n.set?Object.defineProperty(e,i,{get:t[i].get,set:t[i].set}):Object.defineProperty(e,i,{value:t[i]});var n})),e.world=t,e._tempVec2=new r(a,h),i.hasOwnProperty("type")&&"body"===i.type)e.setExistingBody(i,o);else{var l=s(i,"shape",null);l||(l="rectangle"),i.addToWorld=o,e.setBody(l,i)}return e}},function(t,e){t.exports={setBounce:function(t){return this.body.restitution=t,this}}},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(62),s={applyForce:function(t){return this._tempVec2.set(this.body.position.x,this.body.position.y),n.applyForce(this.body,this._tempVec2,t),this},applyForceFrom:function(t,e){return n.applyForce(this.body,t,e),this},thrust:function(t){var e=this.body.angle;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(t){var e=this.body.angle-Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(t){var e=this.body.angle+Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(t){var e=this.body.angle-Math.PI;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};t.exports=s},function(t,e){t.exports={setFriction:function(t,e,i){return this.body.friction=t,void 0!==e&&(this.body.frictionAir=e),void 0!==i&&(this.body.frictionStatic=i),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}}},function(t,e){t.exports={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(62),s=i(3),r={setMass:function(t){return n.setMass(this.body,t),this},setDensity:function(t){return n.setDensity(this.body,t),this},centerOfMass:{get:function(){return new s(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(62),s={setStatic:function(t){return n.setStatic(this.body,t),this},isStatic:function(){return this.body.isStatic}};t.exports=s},function(t,e){t.exports={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(109),s=i(62),r=i(106),o=i(2),a=i(1292),h=i(1293),l=i(86),u={setRectangle:function(t,e,i){return this.setBody({type:"rectangle",width:t,height:e},i)},setCircle:function(t,e){return this.setBody({type:"circle",radius:t},e)},setPolygon:function(t,e,i){return this.setBody({type:"polygon",sides:e,radius:t},i)},setTrapezoid:function(t,e,i,n){return this.setBody({type:"trapezoid",width:t,height:e,slope:i},n)},setExistingBody:function(t,e){void 0===e&&(e=!0),this.body&&this.world.remove(this.body,!0),this.body=t;for(var i=0;i * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1294),s=i(239),r=i(240),o={setToSleep:function(){s.set(this.body,!0)},setAwake:function(){s.set(this.body,!1)},setSleepThreshold:function(t){return void 0===t&&(t=60),this.body.sleepThreshold=t,this},setSleepEvents:function(t,e){return this.setSleepStartEvent(t),this.setSleepEndEvent(e),this},setSleepStartEvent:function(t){if(t){var e=this.world;r.on(this.body,"sleepStart",(function(t){e.emit(n.SLEEP_START,t,this)}))}else r.off(this.body,"sleepStart");return this},setSleepEndEvent:function(t){if(t){var e=this.world;r.on(this.body,"sleepEnd",(function(t){e.emit(n.SLEEP_END,t,this)}))}else r.off(this.body,"sleepEnd");return this}};t.exports=o},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="afteradd"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="afterremove"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="afterupdate"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="beforeadd"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="beforeremove"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="beforeupdate"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="collisionactive"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="collisionend"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="collisionstart"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="dragend"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="drag"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="dragstart"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pause"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="resume"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="sleepend"},function(t,e){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="sleepstart"},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(62),s=i(15),r=i(235),o=i(236),a={x:{get:function(){return this.body.position.x},set:function(t){this._tempVec2.set(t,this.y),n.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(t){this._tempVec2.set(this.x,t),n.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4,n.scale(this.body,e,i),n.scale(this.body,t,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4,n.scale(this.body,e,i),n.scale(this.body,this._scaleX,t)}},angle:{get:function(){return o(this.body.angle*s.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(t){this._rotation=r(t),n.setAngle(this.body,this._rotation)}},setPosition:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._tempVec2.set(t,e),n.setPosition(this.body,this._tempVec2),this},setRotation:function(t){return void 0===t&&(t=0),this._rotation=r(t),n.setAngle(this.body,t),this},setFixedRotation:function(){return n.setInertia(this.body,1/0),this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,n.setAngle(this.body,this.rotation),this},setScale:function(t,e,i){void 0===t&&(t=1),void 0===e&&(e=t);var s=1/this._scaleX,r=1/this._scaleY;return this._scaleX=t,this._scaleY=e,n.scale(this.body,s,r,i),n.scale(this.body,t,e,i),this}};t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(62),s={setAngularVelocity:function(t){return n.setAngularVelocity(this.body,t),this},setVelocityX:function(t){return this._tempVec2.set(t,this.body.velocity.y),n.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(t){return this._tempVec2.set(this.body.velocity.x,t),n.setVelocity(this.body,this._tempVec2),this},setVelocity:function(t,e){return this._tempVec2.set(t,e),n.setVelocity(this.body,this._tempVec2),this}};t.exports=s},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(100),s=i(0),r=i(148),o=i(219),a=i(514),h=i(1294),l=i(54),u=i(126),c=i(239),d=i(3),f=i(86),p=new s({initialize:function(t,e,i){void 0===i&&(i={}),this.scene=t,this.world=e,this.camera=null,this.pointer=null,this.active=!0,this.position=new d,this.body=null,this.part=null,this.constraint=o.create(u(i,{label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}})),this.world.on(h.BEFORE_UPDATE,this.update,this),t.sys.input.on(l.POINTER_DOWN,this.onDown,this),t.sys.input.on(l.POINTER_UP,this.onUp,this)},onDown:function(t){this.pointer||(this.pointer=t,this.camera=t.camera)},onUp:function(t){t===this.pointer&&(this.pointer=null)},getBody:function(t){var e=this.position,i=this.constraint;this.camera.getWorldPoint(t.x,t.y,e);for(var s=r.allBodies(this.world.localWorld),o=0;o1?1:0;s * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(105),s=i(512),r=i(109),o=i(62),a=i(1381),h=i(100),l=i(0),u=i(148),c=i(1290),d=i(219),f=i(514),p=i(53),g=i(1382),v=i(2),m=i(6),y=i(1299),x=i(1425),T=i(1426),w=i(1386),b=i(1427),E=i(126),S=i(472),_=i(1300),A=i(1297),C=i(23),M=i(1387),P=i(1301),O=i(515),R=i(22),L=i(1291),D=i(99),k=i(86),F=i(1389),I=new l({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=o,this.composite=u,this.detector=f,this.grid=y,this.pair=S,this.pairs=_,this.query=M,this.resolver=P,this.sat=O,this.constraint=d,this.bodies=r,this.composites=c,this.axes=s,this.bounds=h,this.svg=L,this.vector=D,this.vertices=k,this.verts=k,this._tempVec2=D.create(),m(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),m(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),m(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),P._restingThresh=m(this.config,"restingThresh",4),P._restingThreshTangent=m(this.config,"restingThreshTangent",6),P._positionDampen=m(this.config,"positionDampen",.9),P._positionWarming=m(this.config,"positionWarming",.8),P._frictionNormalMultiplier=m(this.config,"frictionNormalMultiplier",5),t.sys.events.once(R.BOOT,this.boot,this),t.sys.events.on(R.START,this.start,this)},boot:function(){this.world=new F(this.scene,this.config),this.add=new g(this.world),this.bodyBounds=new a,this.systems.events.once(R.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new F(this.scene,this.config),this.add=new g(this.world));var t=this.systems.events;t.on(R.UPDATE,this.world.update,this.world),t.on(R.POST_UPDATE,this.world.postUpdate,this.world),t.once(R.SHUTDOWN,this.shutdown,this)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return E(v(e,"matter",{}),v(t,"matter",{}))},enableAttractorPlugin:function(){return A.register(x),A.use(w,x),this},enableWrapPlugin:function(){return A.register(b),A.use(w,b),this},enableCollisionEventsPlugin:function(){return A.register(T),A.use(w,T),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(t,e){this.world.step(t,e)},containsPoint:function(t,e,i){t=this.getMatterBodies(t);var n=D.create(e,i);return M.point(t,n).length>0},intersectPoint:function(t,e,i){i=this.getMatterBodies(i);var n=D.create(t,e),s=[];return M.point(i,n).forEach((function(t){-1===s.indexOf(t)&&s.push(t)})),s},intersectRect:function(t,e,i,n,s,r){void 0===s&&(s=!1),r=this.getMatterBodies(r);var o={min:{x:t,y:e},max:{x:t+i,y:e+n}},a=[];return M.region(r,o,s).forEach((function(t){-1===a.indexOf(t)&&a.push(t)})),a},intersectRay:function(t,e,i,n,s,r){void 0===s&&(s=1),r=this.getMatterBodies(r);for(var o=[],a=M.ray(r,D.create(t,e),D.create(i,n),s),h=0;h0)for(var a=s+1;ae.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Canvas:i(1429),Snapshot:i(1430),WebGL:i(1431)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={CanvasRenderer:i(504),GetBlendModes:i(506),SetTransform:i(28)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Canvas:i(505),WebGL:i(508)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Utils:i(9),WebGLPipeline:i(147),WebGLRenderer:i(507),Pipelines:i(1432),BYTE:0,SHORT:1,UNSIGNED_BYTE:2,UNSIGNED_SHORT:3,FLOAT:4}},function(t,e,i){ /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={BitmapMaskPipeline:i(509),ForwardDiffuseLightPipeline:i(510),TextureTintPipeline:i(237),TextureTintStripPipeline:i(511),ModelViewProjection:i(238)}}])}));