phaser/plugins/camera3d/dist/camera3d.min.js

1 line
112 KiB
JavaScript
Raw Normal View History

var Camera3DPlugin=function(n){var e={};function s(t){if(e[t])return e[t].exports;var i=e[t]={i:t,l:!1,exports:{}};return n[t].call(i.exports,i,i.exports,s),i.l=!0,i.exports}return s.m=n,s.c=e,s.d=function(t,i,n){s.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:n})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(i,t){if(1&t&&(i=s(i)),8&t)return i;if(4&t&&"object"==typeof i&&i&&i.__esModule)return i;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:i}),2&t&&"string"!=typeof i)for(var e in i)s.d(n,e,function(t){return i[t]}.bind(null,e));return n},s.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(i,"a",i),i},s.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},s.p="",s(s.s=43)}([function(t,i){function r(t,i,n,e){for(var s in i)if(i.hasOwnProperty(s)){var r=(u=i,c=s,l=p=void 0,l=(f=n)?u[c]:Object.getOwnPropertyDescriptor(u,c),!f&&l.value&&"object"==typeof l.value&&(l=l.value),!(!l||!((p=l).get&&"function"==typeof p.get||p.set&&"function"==typeof p.set))&&(void 0===l.enumerable&&(l.enumerable=!0),void 0===l.configurable&&(l.configurable=!0),l));if(!1!==r){if(o=(e||t).prototype,h=s,a=void 0,(a=Object.getOwnPropertyDescriptor(o,h))&&(a.value&&"object"==typeof a.value&&(a=a.value),!1===a.configurable)){if(d.ignoreFinals)continue;throw new Error("cannot override final property '"+s+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,s,r)}else t.prototype[s]=i[s]}var o,h,a,u,c,f,p,l}function o(t,i){if(i){Array.isArray(i)||(i=[i]);for(var n=0;n<i.length;n++)r(t,i[n].prototype||i[n])}}function d(t){var i,n,e;if((t=t||{}).initialize){if("function"!=typeof t.initialize)throw new Error("initialize must be a function");e=t.initialize,delete t.initialize}else{e=t.Extends?(n=t.Extends,function(){n.apply(this,arguments)}):function(){}}t.Extends?(e.prototype=Object.create(t.Extends.prototype),e.prototype.constructor=e,i=t.Extends,delete t.Extends):e.prototype.constructor=e;var s=null;return t.Mixins&&(s=t.Mixins,delete t.Mixins),o(e,s),r(e,t,!0,i),e}d.extend=r,d.mixin=o,d.ignoreFinals=!1,t.exports=d},function(t,i,n){var e=n(0),s=n(17),r=new e({initialize:function(t,i){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===i&&(i=t),this.x=t||0,this.y=i||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,i){return void 0===i&&(i=t),this.x=t,this.y=i,this},setTo:function(t,i){return this.set(t,i)},setToPolar:function(t,i){return null==i&&(i=1),this.x=Math.cos(t)*i,this.y=Math.sin(t)*i,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,i){return s(this.x,t.x,i)&&s(this.y,t.y,i)},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 i=t.x-this.x,n=t.y-this.y;return Math.sqrt(i*i+n*n)},distanceSq:function(t){var i=t.x-this.x,n=t.y-this.y;return i*i+n*n},length:function(){var t=this.x,i=this.y;return Math.sqrt(t*t+i*i)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,i=this.y;return t*t+i*i},normalize:function(){var t=this.x,i=this.y,n=t*t+i*i;return 0<n&&(n=1/Math.sqrt(n),this.x=t*n,this.y=i*n),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:func