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

1 line
79 KiB
JavaScript
Raw Normal View History

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