phaser/dist/phaser-arcade-physics.min.js

1 line
940 KiB
JavaScript
Raw Normal View History

2021-10-27 16:23:03 +00:00
!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()}(this,(function(){return(()=>{var t={6659:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function s(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function n(t,e,s,n,a){if("function"!=typeof s)throw new TypeError("The listener must be a function");var o=new r(s,n||t,a),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],o]:t._events[h].push(o):(t._events[h]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function o(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),o.prototype.eventNames=function(){var t,s,r=[];if(0===this._eventsCount)return r;for(s in t=this._events)e.call(t,s)&&r.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},o.prototype.listeners=function(t){var e=i?i+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var r=0,n=s.length,a=new Array(n);r<n;r++)a[r]=s[r].fn;return a},o.prototype.listenerCount=function(t){var e=i?i+t:t,s=this._events[e];return s?s.fn?1:s.length:0},o.prototype.emit=function(t,e,s,r,n,a){var o=i?i+t:t;if(!this._events[o])return!1;var h,l,u=this._events[o],c=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,s),!0;case 4:return u.fn.call(u.context,e,s,r),!0;case 5:return u.fn.call(u.context,e,s,r,n),!0;case 6:return u.fn.call(u.context,e,s,r,n,a),!0}for(l=1,h=new Array(c-1);l<c;l++)h[l-1]=arguments[l];u.fn.apply(u.context,h)}else{var d,f=u.length;for(l=0;l<f;l++)switch(u[l].once&&this.removeListener(t,u[l].fn,void 0,!0),c){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,e);break;case 3:u[l].fn.call(u[l].context,e,s);break;case 4:u[l].fn.call(u[l].context,e,s,r);break;default:if(!h)for(d=1,h=new Array(c-1);d<c;d++)h[d-1]=arguments[d];u[l].fn.apply(u[l].context,h)}}return!0},o.prototype.on=function(t,e,i){return n(this,t,e,i,!1)},o.prototype.once=function(t,e,i){return n(this,t,e,i,!0)},o.prototype.removeListener=function(t,e,s,r){var n=i?i+t:t;if(!this._events[n])return this;if(!e)return a(this,n),this;var o=this._events[n];if(o.fn)o.fn!==e||r&&!o.once||s&&o.context!==s||a(this,n);else{for(var h=0,l=[],u=o.length;h<u;h++)(o[h].fn!==e||r&&!o[h].once||s&&o[h].context!==s)&&l.push(o[h]);l.length?this._events[n]=1===l.length?l[0]:l:a(this,n)}return this},o.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&a(this,e)):(this._events=new s,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=i,o.EventEmitter=o,t.exports=o},62270:(t,e,i)=>{var s=i(82590);t.exports=function(t,e,i,r){for(var n=t[0],a=1;a<t.length;a++){var o=t[a];s(o,n,e,i,r),n=o}return t}},61148:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,r,n){return s(t,"angle",e,i,r,n)}},22015:t=>{t.exports=function(t,e,i){for(var s=0;s<t.length;s++){var r=t[s];e.call(i,r)}return t}},31060:t=>{t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=i;s<t.length;s++){var r=t[s],n=!0;for(var a in e)r[a]!==e[a]&&(n=!1);if(n)return r}return null}},52367:t=>{t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=i;s<t.length;s++){var r=t[s],n=!0;for(var a in e)r[a]!==e[a]&&(n=!1);if(n)return r}return null}},12673:(t,e,i)=>{var s=i(40327),r=i(84093),n=i(72632),a=i(72283),o=new(i(71030))({sys:{queueDepthSort:a,events:{once:a}}},0,0,1,1);t.exports=function(t,e){void 0===e&&(e={});var i=e.hasOwnProperty("width"),a=e.hasOwnProperty("height"),h=n(e,"width",-1),l=n(e,"height",-1),u=n(e,"cellWidth",1),c=n(e,"cellHeight",u),d=n(e,"position",r.TOP_LEFT),f=n(e,"x",0),p=n(e,"y",0),v=0,g=0,m=h*u,y=l*c;o.setPosition(f,p),o.setSize(u,c);for(var x=0;x<t.length;x++)if(s(t[x],o,d),i&