1 line
120 KiB
JavaScript
1 line
120 KiB
JavaScript
|
var Camera3DPlugin=function(e){var n={};function s(t){if(n[t])return n[t].exports;var i=n[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,s),i.l=!0,i.exports}return s.m=e,s.c=n,s.d=function(t,i,e){s.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:e})},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 e=Object.create(null);if(s.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:i}),2&t&&"string"!=typeof i)for(var n in i)s.d(e,n,function(t){return i[t]}.bind(null,n));return e},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=42)}([function(t,i){function r(t,i,e,n){for(var s in i)if(i.hasOwnProperty(s)){var r=(u=i,c=s,p=l=void 0,p=(f=e)?u[c]:Object.getOwnPropertyDescriptor(u,c),!f&&p.value&&"object"==typeof p.value&&(p=p.value),!(!p||!((l=p).get&&"function"==typeof l.get||l.set&&"function"==typeof l.set))&&(void 0===p.enumerable&&(p.enumerable=!0),void 0===p.configurable&&(p.configurable=!0),p));if(!1!==r){if(o=(n||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,l,p}function o(t,i){if(i){Array.isArray(i)||(i=[i]);for(var e=0;e<i.length;e++)r(t,i[e].prototype||i[e])}}function d(t){var i,e,n;if((t=t||{}).initialize){if("function"!=typeof t.initialize)throw new Error("initialize must be a function");n=t.initialize,delete t.initialize}else{n=t.Extends?(e=t.Extends,function(){e.apply(this,arguments)}):function(){}}t.Extends?(n.prototype=Object.create(t.Extends.prototype),n.prototype.constructor=n,i=t.Extends,delete t.Extends):n.prototype.constructor=n;var s=null;return t.Mixins&&(s=t.Mixins,delete t.Mixins),o(n,s),r(n,t,!0,i),n}d.extend=r,d.mixin=o,d.ignoreFinals=!1,t.exports=d},function(t,i,e){var n=e(0),s=e(18),r=new n({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,e=t.y-this.y;return Math.sqrt(i*i+e*e)},distanceSq:function(t){var i=t.x-this.x,e=t.y-this.y;return i*i+e*e},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,e=t*t+i*i;return 0<e&&(e=1/Math.sqrt(e),this.x=t*e,this.y=i*e),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
|