gl-draw 0.0.22 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,21 +1,4 @@
1
- (function(){var Be={187:function(R){"use strict";var T=typeof Reflect=="object"?Reflect:null,x=T&&typeof T.apply=="function"?T.apply:function(c,p,b){return Function.prototype.apply.call(c,p,b)},G;T&&typeof T.ownKeys=="function"?G=T.ownKeys:Object.getOwnPropertySymbols?G=function(c){return Object.getOwnPropertyNames(c).concat(Object.getOwnPropertySymbols(c))}:G=function(c){return Object.getOwnPropertyNames(c)};function z(f){console&&console.warn&&console.warn(f)}var E=Number.isNaN||function(c){return c!==c};function m(){m.init.call(this)}R.exports=m,R.exports.once=$,m.EventEmitter=m,m.prototype._events=void 0,m.prototype._eventsCount=0,m.prototype._maxListeners=void 0;var B=10;function q(f){if(typeof f!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof f)}Object.defineProperty(m,"defaultMaxListeners",{enumerable:!0,get:function(){return B},set:function(f){if(typeof f!="number"||f<0||E(f))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+f+".");B=f}}),m.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},m.prototype.setMaxListeners=function(c){if(typeof c!="number"||c<0||E(c))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+c+".");return this._maxListeners=c,this};function W(f){return f._maxListeners===void 0?m.defaultMaxListeners:f._maxListeners}m.prototype.getMaxListeners=function(){return W(this)},m.prototype.emit=function(c){for(var p=[],b=1;b<arguments.length;b++)p.push(arguments[b]);var S=c==="error",A=this._events;if(A!==void 0)S=S&&A.error===void 0;else if(!S)return!1;if(S){var j;if(p.length>0&&(j=p[0]),j instanceof Error)throw j;var F=new Error("Unhandled error."+(j?" ("+j.message+")":""));throw F.context=j,F}var oe=A[c];if(oe===void 0)return!1;if(typeof oe=="function")x(oe,this,p);else for(var de=oe.length,he=se(oe,de),b=0;b<de;++b)x(he[b],this,p);return!0};function U(f,c,p,b){var S,A,j;if(q(p),A=f._events,A===void 0?(A=f._events=Object.create(null),f._eventsCount=0):(A.newListener!==void 0&&(f.emit("newListener",c,p.listener?p.listener:p),A=f._events),j=A[c]),j===void 0)j=A[c]=p,++f._eventsCount;else if(typeof j=="function"?j=A[c]=b?[p,j]:[j,p]:b?j.unshift(p):j.push(p),S=W(f),S>0&&j.length>S&&!j.warned){j.warned=!0;var F=new Error("Possible EventEmitter memory leak detected. "+j.length+" "+String(c)+" listeners added. Use emitter.setMaxListeners() to increase limit");F.name="MaxListenersExceededWarning",F.emitter=f,F.type=c,F.count=j.length,z(F)}return f}m.prototype.addListener=function(c,p){return U(this,c,p,!1)},m.prototype.on=m.prototype.addListener,m.prototype.prependListener=function(c,p){return U(this,c,p,!0)};function X(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Q(f,c,p){var b={fired:!1,wrapFn:void 0,target:f,type:c,listener:p},S=X.bind(b);return S.listener=p,b.wrapFn=S,S}m.prototype.once=function(c,p){return q(p),this.on(c,Q(this,c,p)),this},m.prototype.prependOnceListener=function(c,p){return q(p),this.prependListener(c,Q(this,c,p)),this},m.prototype.removeListener=function(c,p){var b,S,A,j,F;if(q(p),S=this._events,S===void 0)return this;if(b=S[c],b===void 0)return this;if(b===p||b.listener===p)--this._eventsCount===0?this._events=Object.create(null):(delete S[c],S.removeListener&&this.emit("removeListener",c,b.listener||p));else if(typeof b!="function"){for(A=-1,j=b.length-1;j>=0;j--)if(b[j]===p||b[j].listener===p){F=b[j].listener,A=j;break}if(A<0)return this;A===0?b.shift():ie(b,A),b.length===1&&(S[c]=b[0]),S.removeListener!==void 0&&this.emit("removeListener",c,F||p)}return this},m.prototype.off=m.prototype.removeListener,m.prototype.removeAllListeners=function(c){var p,b,S;if(b=this._events,b===void 0)return this;if(b.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):b[c]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete b[c]),this;if(arguments.length===0){var A=Object.keys(b),j;for(S=0;S<A.length;++S)j=A[S],j!=="removeListener"&&this.removeAllListeners(j);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(p=b[c],typeof p=="function")this.removeListener(c,p);else if(p!==void 0)for(S=p.length-1;S>=0;S--)this.removeListener(c,p[S]);return this};function Y(f,c,p){var b=f._events;if(b===void 0)return[];var S=b[c];return S===void 0?[]:typeof S=="function"?p?[S.listener||S]:[S]:p?V(S):se(S,S.length)}m.prototype.listeners=function(c){return Y(this,c,!0)},m.prototype.rawListeners=function(c){return Y(this,c,!1)},m.listenerCount=function(f,c){return typeof f.listenerCount=="function"?f.listenerCount(c):d.call(f,c)},m.prototype.listenerCount=d;function d(f){var c=this._events;if(c!==void 0){var p=c[f];if(typeof p=="function")return 1;if(p!==void 0)return p.length}return 0}m.prototype.eventNames=function(){return this._eventsCount>0?G(this._events):[]};function se(f,c){for(var p=new Array(c),b=0;b<c;++b)p[b]=f[b];return p}function ie(f,c){for(;c+1<f.length;c++)f[c]=f[c+1];f.pop()}function V(f){for(var c=new Array(f.length),p=0;p<c.length;++p)c[p]=f[p].listener||f[p];return c}function $(f,c){return new Promise(function(p,b){function S(j){f.removeListener(c,A),b(j)}function A(){typeof f.removeListener=="function"&&f.removeListener("error",S),p([].slice.call(arguments))}N(f,c,A,{once:!0}),c!=="error"&&D(f,S,{once:!0})})}function D(f,c,p){typeof f.on=="function"&&N(f,"error",c,p)}function N(f,c,p,b){if(typeof f.on=="function")b.once?f.once(c,p):f.on(c,p);else if(typeof f.addEventListener=="function")f.addEventListener(c,function S(A){b.once&&f.removeEventListener(c,S),p(A)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof f)}},666:function(R){var T=function(x){"use strict";var G=Object.prototype,z=G.hasOwnProperty,E,m=typeof Symbol=="function"?Symbol:{},B=m.iterator||"@@iterator",q=m.asyncIterator||"@@asyncIterator",W=m.toStringTag||"@@toStringTag";function U(v,l,g){return Object.defineProperty(v,l,{value:g,enumerable:!0,configurable:!0,writable:!0}),v[l]}try{U({},"")}catch(v){U=function(l,g,O){return l[g]=O}}function X(v,l,g,O){var C=l&&l.prototype instanceof $?l:$,H=Object.create(C.prototype),te=new he(O||[]);return H._invoke=j(v,g,te),H}x.wrap=X;function Q(v,l,g){try{return{type:"normal",arg:v.call(l,g)}}catch(O){return{type:"throw",arg:O}}}var Y="suspendedStart",d="suspendedYield",se="executing",ie="completed",V={};function $(){}function D(){}function N(){}var f={};U(f,B,function(){return this});var c=Object.getPrototypeOf,p=c&&c(c(me([])));p&&p!==G&&z.call(p,B)&&(f=p);var b=N.prototype=$.prototype=Object.create(f);D.prototype=N,U(b,"constructor",N),U(N,"constructor",D),D.displayName=U(N,W,"GeneratorFunction");function S(v){["next","throw","return"].forEach(function(l){U(v,l,function(g){return this._invoke(l,g)})})}x.isGeneratorFunction=function(v){var l=typeof v=="function"&&v.constructor;return l?l===D||(l.displayName||l.name)==="GeneratorFunction":!1},x.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,N):(v.__proto__=N,U(v,W,"GeneratorFunction")),v.prototype=Object.create(b),v},x.awrap=function(v){return{__await:v}};function A(v,l){function g(H,te,J,re){var ee=Q(v[H],v,te);if(ee.type==="throw")re(ee.arg);else{var ve=ee.arg,le=ve.value;return le&&typeof le=="object"&&z.call(le,"__await")?l.resolve(le.__await).then(function(ue){g("next",ue,J,re)},function(ue){g("throw",ue,J,re)}):l.resolve(le).then(function(ue){ve.value=ue,J(ve)},function(ue){return g("throw",ue,J,re)})}}var O;function C(H,te){function J(){return new l(function(re,ee){g(H,te,re,ee)})}return O=O?O.then(J,J):J()}this._invoke=C}S(A.prototype),U(A.prototype,q,function(){return this}),x.AsyncIterator=A,x.async=function(v,l,g,O,C){C===void 0&&(C=Promise);var H=new A(X(v,l,g,O),C);return x.isGeneratorFunction(l)?H:H.next().then(function(te){return te.done?te.value:H.next()})};function j(v,l,g){var O=Y;return function(H,te){if(O===se)throw new Error("Generator is already running");if(O===ie){if(H==="throw")throw te;return ge()}for(g.method=H,g.arg=te;;){var J=g.delegate;if(J){var re=F(J,g);if(re){if(re===V)continue;return re}}if(g.method==="next")g.sent=g._sent=g.arg;else if(g.method==="throw"){if(O===Y)throw O=ie,g.arg;g.dispatchException(g.arg)}else g.method==="return"&&g.abrupt("return",g.arg);O=se;var ee=Q(v,l,g);if(ee.type==="normal"){if(O=g.done?ie:d,ee.arg===V)continue;return{value:ee.arg,done:g.done}}else ee.type==="throw"&&(O=ie,g.method="throw",g.arg=ee.arg)}}}function F(v,l){var g=v.iterator[l.method];if(g===E){if(l.delegate=null,l.method==="throw"){if(v.iterator.return&&(l.method="return",l.arg=E,F(v,l),l.method==="throw"))return V;l.method="throw",l.arg=new TypeError("The iterator does not provide a 'throw' method")}return V}var O=Q(g,v.iterator,l.arg);if(O.type==="throw")return l.method="throw",l.arg=O.arg,l.delegate=null,V;var C=O.arg;if(!C)return l.method="throw",l.arg=new TypeError("iterator result is not an object"),l.delegate=null,V;if(C.done)l[v.resultName]=C.value,l.next=v.nextLoc,l.method!=="return"&&(l.method="next",l.arg=E);else return C;return l.delegate=null,V}S(b),U(b,W,"Generator"),U(b,B,function(){return this}),U(b,"toString",function(){return"[object Generator]"});function oe(v){var l={tryLoc:v[0]};1 in v&&(l.catchLoc=v[1]),2 in v&&(l.finallyLoc=v[2],l.afterLoc=v[3]),this.tryEntries.push(l)}function de(v){var l=v.completion||{};l.type="normal",delete l.arg,v.completion=l}function he(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(oe,this),this.reset(!0)}x.keys=function(v){var l=[];for(var g in v)l.push(g);return l.reverse(),function O(){for(;l.length;){var C=l.pop();if(C in v)return O.value=C,O.done=!1,O}return O.done=!0,O}};function me(v){if(v){var l=v[B];if(l)return l.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var g=-1,O=function C(){for(;++g<v.length;)if(z.call(v,g))return C.value=v[g],C.done=!1,C;return C.value=E,C.done=!0,C};return O.next=O}}return{next:ge}}x.values=me;function ge(){return{value:E,done:!0}}return he.prototype={constructor:he,reset:function(v){if(this.prev=0,this.next=0,this.sent=this._sent=E,this.done=!1,this.delegate=null,this.method="next",this.arg=E,this.tryEntries.forEach(de),!v)for(var l in this)l.charAt(0)==="t"&&z.call(this,l)&&!isNaN(+l.slice(1))&&(this[l]=E)},stop:function(){this.done=!0;var v=this.tryEntries[0],l=v.completion;if(l.type==="throw")throw l.arg;return this.rval},dispatchException:function(v){if(this.done)throw v;var l=this;function g(re,ee){return H.type="throw",H.arg=v,l.next=re,ee&&(l.method="next",l.arg=E),!!ee}for(var O=this.tryEntries.length-1;O>=0;--O){var C=this.tryEntries[O],H=C.completion;if(C.tryLoc==="root")return g("end");if(C.tryLoc<=this.prev){var te=z.call(C,"catchLoc"),J=z.call(C,"finallyLoc");if(te&&J){if(this.prev<C.catchLoc)return g(C.catchLoc,!0);if(this.prev<C.finallyLoc)return g(C.finallyLoc)}else if(te){if(this.prev<C.catchLoc)return g(C.catchLoc,!0)}else if(J){if(this.prev<C.finallyLoc)return g(C.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(v,l){for(var g=this.tryEntries.length-1;g>=0;--g){var O=this.tryEntries[g];if(O.tryLoc<=this.prev&&z.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var C=O;break}}C&&(v==="break"||v==="continue")&&C.tryLoc<=l&&l<=C.finallyLoc&&(C=null);var H=C?C.completion:{};return H.type=v,H.arg=l,C?(this.method="next",this.next=C.finallyLoc,V):this.complete(H)},complete:function(v,l){if(v.type==="throw")throw v.arg;return v.type==="break"||v.type==="continue"?this.next=v.arg:v.type==="return"?(this.rval=this.arg=v.arg,this.method="return",this.next="end"):v.type==="normal"&&l&&(this.next=l),V},finish:function(v){for(var l=this.tryEntries.length-1;l>=0;--l){var g=this.tryEntries[l];if(g.finallyLoc===v)return this.complete(g.completion,g.afterLoc),de(g),V}},catch:function(v){for(var l=this.tryEntries.length-1;l>=0;--l){var g=this.tryEntries[l];if(g.tryLoc===v){var O=g.completion;if(O.type==="throw"){var C=O.arg;de(g)}return C}}throw new Error("illegal catch attempt")},delegateYield:function(v,l,g){return this.delegate={iterator:me(v),resultName:l,nextLoc:g},this.method==="next"&&(this.arg=E),V}},x}(R.exports);try{regeneratorRuntime=T}catch(x){typeof globalThis=="object"?globalThis.regeneratorRuntime=T:Function("r","regeneratorRuntime = r")(T)}},695:function(R,T,x){"use strict";x.d(T,{Z:function(){return G}});function G(z){if(z.geometry&&z.geometry.dispose(),z.material){var E=Array.isArray(z.material)?z.material:[z.material];E.forEach(function(m){var B,q,W,U,X,Q,Y,d,se,ie,V,$,D;(B=m.map)===null||B===void 0||B.dispose(),(q=m.lightMap)===null||q===void 0||q.dispose(),(W=m.bumpMap)===null||W===void 0||W.dispose(),(U=m.normalMap)===null||U===void 0||U.dispose(),(X=m.specularMap)===null||X===void 0||X.dispose(),(Q=m.envMap)===null||Q===void 0||Q.dispose(),(Y=m.alphaMap)===null||Y===void 0||Y.dispose(),(d=m.aoMap)===null||d===void 0||d.dispose(),(se=m.displacementMap)===null||se===void 0||se.dispose(),(ie=m.emissiveMap)===null||ie===void 0||ie.dispose(),(V=m.gradientMap)===null||V===void 0||V.dispose(),($=m.metalnessMap)===null||$===void 0||$.dispose(),(D=m.roughnessMap)===null||D===void 0||D.dispose(),m.dispose()})}}},519:function(R,T,x){"use strict";x.d(T,{disposeMesh:function(){return m.Z},isPlainObject:function(){return W.Z}});var G=x(666),z=x.n(G),E=null,m=x(695),B=x(644);function q(V){if(V.material){var $=Array.isArray(V.material)?V.material:[V.material];$.forEach(function(D){var N,f;(N=D.color)===null||N===void 0||N.convertSRGBToLinear(),(f=D.emissive)===null||f===void 0||f.convertSRGBToLinear(),D.map&&(D.map.encoding=THREE.sRGBEncoding),D.emissiveMap&&(D.emissiveMap.encoding=THREE.sRGBEncoding)})}}var W=x(738),U=x(568),X=x(924),Q=require("idb-keyval"),Y=x(484),d=null,se=null,ie=function(){var V=(0,U.Z)(z().mark(function $(D,N){var f,c,p,b,S,A;return z().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return f=N.version,F.next=4,(0,Q.get)(D);case 4:if(p=F.sent,!(p&&p[f])){F.next=9;break}c=p[f],F.next=15;break;case 9:return F.next=11,(0,Y.Z)(fetch(D).then(function(oe){if(oe.ok)return oe.blob();throw new Error}));case 11:b=F.sent,S=b.res,A=b.err,A||(c=S,(0,Q.set)(D,(0,X.Z)({},f,S)));case 15:return F.abrupt("return",c?{url:URL.createObjectURL(c)}:{url:D});case 16:case"end":return F.stop()}},$)}));return function(D,N){return V.apply(this,arguments)}}()},738:function(R,T,x){"use strict";x.d(T,{Z:function(){return z}});function G(E){return Object.prototype.toString.call(E)==="[object Object]"}function z(E){if(G(E)===!1)return!1;var m=E.constructor;if(m===void 0)return!0;var B=m.prototype;return!(G(B)===!1||B.hasOwnProperty("isPrototypeOf")===!1)}},484:function(R,T,x){"use strict";x.d(T,{Z:function(){return z}});var G=x(42);function z(E){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return E.then(function(B){return(0,G.Z)({err:null,res:B},m)}).catch(function(B){return(0,G.Z)({err:B,res:void 0},m)})}},644:function(R){"use strict";R.exports=require("three")},568:function(R,T,x){"use strict";x.d(T,{Z:function(){return z}});function G(E,m,B,q,W,U,X){try{var Q=E[U](X),Y=Q.value}catch(d){B(d);return}Q.done?m(Y):Promise.resolve(Y).then(q,W)}function z(E){return function(){var m=this,B=arguments;return new Promise(function(q,W){var U=E.apply(m,B);function X(Y){G(U,q,W,X,Q,"next",Y)}function Q(Y){G(U,q,W,X,Q,"throw",Y)}X(void 0)})}}},924:function(R,T,x){"use strict";x.d(T,{Z:function(){return G}});function G(z,E,m){return E in z?Object.defineProperty(z,E,{value:m,enumerable:!0,configurable:!0,writable:!0}):z[E]=m,z}},42:function(R,T,x){"use strict";x.d(T,{Z:function(){return z}});var G=x(924);function z(E){for(var m=1;m<arguments.length;m++){var B=arguments[m]!=null?arguments[m]:{},q=Object.keys(B);typeof Object.getOwnPropertySymbols=="function"&&(q=q.concat(Object.getOwnPropertySymbols(B).filter(function(W){return Object.getOwnPropertyDescriptor(B,W).enumerable}))),q.forEach(function(W){(0,G.Z)(E,W,B[W])})}return E}}},Oe={};function K(R){var T=Oe[R];if(T!==void 0)return T.exports;var x=Oe[R]={exports:{}};return Be[R](x,x.exports,K),x.exports}(function(){K.n=function(R){var T=R&&R.__esModule?function(){return R.default}:function(){return R};return K.d(T,{a:T}),T}})(),function(){K.d=function(R,T){for(var x in T)K.o(T,x)&&!K.o(R,x)&&Object.defineProperty(R,x,{enumerable:!0,get:T[x]})}}(),function(){K.o=function(R,T){return Object.prototype.hasOwnProperty.call(R,T)}}(),function(){K.r=function(R){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(R,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(R,"__esModule",{value:!0})}}();var Pe={};(function(){"use strict";K.r(Pe),K.d(Pe,{BaseObject:function(){return gt},GUIObject:function(){return c},Pencil:function(){return Ce},default:function(){return Ce}});function R(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")}function T(s,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(s,e.key,e)}}function x(s,i,n){return i&&T(s.prototype,i),n&&T(s,n),s}var G=K(42);function z(s,i){var n=Object.keys(s);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(s);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(s,t).enumerable})),n.push.apply(n,e)}return n}function E(s,i){return i=i!=null?i:{},Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):z(Object(i)).forEach(function(n){Object.defineProperty(s,n,Object.getOwnPropertyDescriptor(i,n))}),s}function m(s,i){(i==null||i>s.length)&&(i=s.length);for(var n=0,e=new Array(i);n<i;n++)e[n]=s[n];return e}function B(s){if(Array.isArray(s))return m(s)}function q(s){if(typeof Symbol!="undefined"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}function W(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function U(s,i){if(!!s){if(typeof s=="string")return m(s,i);var n=Object.prototype.toString.call(s).slice(8,-1);if(n==="Object"&&s.constructor&&(n=s.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(s,i)}}function X(s){return B(s)||q(s)||U(s)||W()}var Q=require("@tweenjs/tween.js"),Y=K.n(Q),d=K(644),se=K(187),ie=require("deepmerge"),V=K.n(ie),$=require("three/examples/jsm/libs/stats.module"),D=K.n($),N=require("lil-gui"),f=K.n(N),c=function(){"use strict";function s(n){R(this,s),this.guiParams={},n&&(this.guiParams=n)}var i=s.prototype;return i.showGui=function(e){var t=this;!e||Object.keys(this.guiParams).forEach(function(r){var o=e.addFolder(r),u=t.guiParams[r];Object.keys(u).forEach(function(a){var h=u[a],w=h.min,P=h.max,y=h.step,_=h.name,M=h.paramMap,L=h.items,Z=h.value,I=h.target,ae=a.toLowerCase().indexOf("color")>-1,k,ne=typeof Z=="undefined"&&I,ce=ne?I():u[a],fe=ne?a:"value";L?k=o.add(ce,fe,L):ae?k=o.addColor(ce,fe):k=o.add(ce,fe),k=k.name(_||a),typeof w!="undefined"&&(k=k.min(w)),typeof P!="undefined"&&(k=k.max(P)),typeof y!="undefined"&&(k=k.step(y)),k=k.onChange(function(){t.setTargetValue(r,a,ce[fe],M)}),ne&&k.listen()})})},i.setTargetValue=function(e,t,r,o){var u=this.guiParams[e][t],a=u.onChange,h=u.target,w=u.value,P=t.toLowerCase().indexOf("color")>-1,y=typeof w=="undefined"&&h;if(h&&!y){var _=h();Array.isArray(_)||(_=[_]),_.forEach(function(M){if(!!M)if(P)try{M[o||t].set(r)}catch(L){t!=="color"&&!o&&console.warn("".concat(t," is not a color,set paramMap"))}else M[o||t]=r})}a&&a(r)},i.setTargetValueByParams=function(){var e=this;Object.keys(this.guiParams).forEach(function(t){Object.keys(e.guiParams[t]).forEach(function(r){var o=e.guiParams[t][r];typeof o.value!="undefined"&&e.setTargetValue(t,r,o.value,o.paramMap)})})},s}(),p={None:d.NoToneMapping,Linear:d.LinearToneMapping,Reinhard:d.ReinhardToneMapping,Cineon:d.CineonToneMapping,ACESFilmic:d.ACESFilmicToneMapping},b={antialias:!1,devicePixelRatio:window.devicePixelRatio,powerPreference:"high-performance",toneMapping:"None",toneMappingExposure:1,alpha:!1,outputEncoding:d.LinearEncoding,logarithmicDepthBuffer:!1,preserveDrawingBuffer:!1},S=function(){"use strict";function s(n){R(this,s),this.options=n;var e=n.width,t=n.height,r=n.rendererParams,o=r.alpha,u=r.devicePixelRatio,a=r.antialias,h=r.powerPreference,w=r.toneMapping,P=r.toneMappingExposure,y=r.outputEncoding,_=r.logarithmicDepthBuffer,M=r.preserveDrawingBuffer,L=new d.WebGLRenderer({alpha:o,antialias:a,powerPreference:h,logarithmicDepthBuffer:_,preserveDrawingBuffer:M});L.setSize(e,t),L.setPixelRatio(u),L.autoClear=!1,L.toneMapping=p[w],L.toneMappingExposure=P,L.outputEncoding=y,this.renderer=L}var i=s.prototype;return i.setSize=function(e,t){this.renderer.setSize(e,t)},i.render=function(){var e=this.options,t=e.scene,r=e.camera;this.renderer.render(t,r)},i.setGui=function(e){var t=this,r=new c({renderer:{toneMapping:{value:this.options.rendererParams.toneMapping,items:p,target:function(){return t.renderer}},toneMappingExposure:{value:this.options.rendererParams.toneMappingExposure,min:0,max:Math.pow(2,4),target:function(){return t.renderer}}}});r.showGui(e)},i.dispose=function(){var e,t,r;(e=this.renderer)===null||e===void 0||e.clear(),(t=this.renderer)===null||t===void 0||t.dispose(),(r=this.renderer)===null||r===void 0||r.renderLists.dispose()},s}(),A={fov:45,near:1,far:1e3},j=function(){"use strict";function s(n){R(this,s),this.oldCameraPosition=new d.Vector3,this.oldCameraRotation=new d.Euler,this.customCamera=!1,this.options=n;var e=n.width,t=n.height,r=n.cameraParams;if(r instanceof d.Camera)this.camera=r,this.customCamera=!0;else{var o=r.fov,u=r.far,a=r.near,h=new d.PerspectiveCamera(o,e/t,a,u);h.position.set(0,0,400),h.lookAt(0,0,0),this.camera=h}}var i=s.prototype;return i.checkCameraChange=function(){var e=this.camera,t=this.oldCameraPosition.equals(e.position)&&this.oldCameraRotation.equals(e.rotation);return this.oldCameraPosition=e.position.clone(),this.oldCameraRotation=e.rotation.clone(),!t},i.setSize=function(e,t){this.camera instanceof d.PerspectiveCamera&&(this.camera.aspect=e/t),this.camera.updateProjectionMatrix()},i.setGui=function(e){var t=this,r=new c({camera:{x:{min:-1e4,max:1e4,step:1,target:function(){return t.camera.position}},y:{min:-1e4,max:1e4,step:1,target:function(){return t.camera.position}},z:{min:-1e4,max:1e4,step:1,target:function(){return t.camera.position}},near:{min:0,max:1e3,step:1,target:function(){return t.camera},onChange:function(o){t.camera.updateProjectionMatrix()}},far:{min:0,max:2e4,step:1,target:function(){return t.camera},onChange:function(o){t.camera.updateProjectionMatrix()}}}});this.camera instanceof d.PerspectiveCamera&&(r.guiParams.camera.fov={min:0,max:90,step:1,target:function(){return t.camera},onChange:function(o){t.camera.updateProjectionMatrix()}}),r.showGui(e)},s}(),F=K(519),oe={background:null},de=function(){"use strict";function s(n){R(this,s),this.options=n;var e=n.camera,t=n.sceneParams,r=t.background,o=new d.Scene;r&&(o.background=r),o.add(e),this.scene=o}var i=s.prototype;return i.addAxesHelper=function(){var e,t=new d.AxesHelper(100);(e=this.scene)===null||e===void 0||e.add(t)},i.dispose=function(){var e;(e=this.scene)===null||e===void 0||e.traverse(function(t){(0,F.disposeMesh)(t)})},s}(),he=require("three/examples/jsm/controls/OrbitControls"),me={},ge=function(){"use strict";function s(n){R(this,s),this.options=n;var e=n.camera,t=n.controlParams,r=n.mapControl,o=t.domElement,u=r?new he.MapControls(e,o):new he.OrbitControls(e,o);u.minPolarAngle=Math.PI*.15,u.maxPolarAngle=Math.PI*.85,u.enableDamping=!0,u.dampingFactor=.063,u.autoRotate=!1,u.autoRotateSpeed=-60,u.enableZoom=!0,u.zoomSpeed=.2,this.control=u}var i=s.prototype;return i.limitPan=function(e){var t=e.maxX,r=t===void 0?1/0:t,o=e.minX,u=o===void 0?-1/0:o,a=e.maxZ,h=a===void 0?1/0:a,w=e.minZ,P=w===void 0?-1/0:w,y=e.maxY,_=y===void 0?1/0:y,M=e.minY,L=M===void 0?-1/0:M,Z=this.limitPanV||new d.Vector3,I=this.control,ae=this.options.camera,k=new d.Vector3(u,L,P),ne=new d.Vector3(r,_,h);this.limitPanV=Z,Z.copy(I.target),I.target.clamp(k,ne),Z.sub(I.target),ae.position.sub(Z)},i.update=function(){this.control.update()},i.dispose=function(){this.control.dispose()},s}(),v=require("three/examples/jsm/renderers/CSS3DRenderer"),l=new d.Vector3,g=new d.Matrix4,O=new d.Matrix4,C=new d.Vector3,H=new d.Vector3,te=function s(){"use strict";var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};R(this,s);var n=function(M,L){return C.setFromMatrixPosition(M.matrixWorld),H.setFromMatrixPosition(L.matrixWorld),C.distanceToSquared(H)},e=function(M){var L=[];return M.traverse(function(Z){Z.isCSS2DObject&&L.push(Z)}),L},t=function(M){for(var L=e(M).sort(function(ne,ce){if(ne.renderOrder!==ce.renderOrder)return ce.renderOrder-ne.renderOrder;var fe=w.objects.get(ne).distanceToCameraSquared,ye=w.objects.get(ce).distanceToCameraSquared;return fe-ye}),Z=L.length,I=0,ae=L.length;I<ae;I++){var k=L[I].userData.zIndexFix||0;L[I].element.style.zIndex=Z-I+k}},r=this,o,u,a,h,w={objects:new WeakMap},P=i.element!==void 0?i.element:document.createElement("div");P.style.overflow="hidden",this.domElement=P,this.getSize=function(){return{width:o,height:u}},this.render=function(_,M){_.autoUpdate===!0&&_.updateMatrixWorld(),M.parent===null&&M.updateMatrixWorld(),g.copy(M.matrixWorldInverse),O.multiplyMatrices(M.projectionMatrix,g),y(_,_,M),t(_)},this.setSize=function(_,M){o=_,u=M,a=o/2,h=u/2,P.style.width="".concat(_,"px"),P.style.height="".concat(M,"px")};function y(_,M,L){if(_.isCSS2DObject){l.setFromMatrixPosition(_.matrixWorld),l.applyMatrix4(O);var Z=_.visible===!0&&l.z>=-1&&l.z<=1&&_.layers.test(L.layers)===!0;if(_.element.style.display=Z===!0?"":"none",Z===!0){_.onBeforeRender(r,M,L);var I=_.element;I.style.transform="translate(-50%,-50%) translate(".concat(l.x*a+a,"px,").concat(-l.y*h+h,"px)"),I.parentNode!==P&&P.appendChild(I),_.onAfterRender(r,M,L)}var ae={distanceToCameraSquared:n(L,_)};w.objects.set(_,ae)}for(var k=0,ne=_.children.length;k<ne;k++)y(_.children[k],M,L)}},J={zIndex:"auto"},re=function(){"use strict";function s(n){R(this,s),this.container=n}var i=s.prototype;return i.addRenderer=function(e,t){var r=this.container,o=r.offsetWidth,u=r.offsetHeight,a=e==="css2d"?new te:new v.CSS3DRenderer;a.domElement.style.position="absolute",a.domElement.style.top="0",a.domElement.style.pointerEvents="none",a.domElement.style.zIndex=t.zIndex,a.setSize(o,u),r.appendChild(a.domElement),e==="css2d"?this.css2Drenderer=a:e==="css3d"&&(this.css3Drenderer=a)},i.setSize=function(e,t){var r,o;(r=this.css2Drenderer)===null||r===void 0||r.setSize(e,t),(o=this.css3Drenderer)===null||o===void 0||o.setSize(e,t)},i.render=function(e,t){var r,o;(r=this.css2Drenderer)===null||r===void 0||r.render(e,t),(o=this.css3Drenderer)===null||o===void 0||o.render(e,t)},i.dispose=function(){this.css2Drenderer=void 0,this.css3Drenderer=void 0},s}(),ee=require("three/examples/jsm/postprocessing/EffectComposer"),ve=require("three/examples/jsm/postprocessing/RenderPass"),le=require("three/examples/jsm/postprocessing/ShaderPass"),ue=require("three/examples/jsm/shaders/CopyShader"),Fe=require("three/examples/jsm/shaders/GammaCorrectionShader"),Ue=require("three/examples/jsm/postprocessing/SMAAPass"),ke=require("three/examples/jsm/postprocessing/SSAARenderPass"),Ve=require("three/examples/jsm/shaders/FXAAShader"),Ie=function(){try{var s=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&s.getContext("webgl2"))}catch(i){return!1}},Pt=0,Ne=1,pe=!1,Re=Ie()!==!1,We=`varying vec2 vUv;
2
-
3
- void main() {
4
-
5
- vUv = uv;
6
-
7
- gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
8
-
9
- }`,He=`uniform sampler2D baseTexture;
10
- uniform sampler2D bloomTexture;
11
-
12
- varying vec2 vUv;
13
-
14
- void main() {
15
-
16
- gl_FragColor = (texture2D(baseTexture, vUv) + vec4(1.0) * texture2D(bloomTexture, vUv));
17
-
18
- }`;function _e(s,i){return _e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_e(s,i)}function Me(s,i){return _e(s,i)}function Ze(s,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(i&&i.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),i&&Me(s,i)}function qe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(s){return!1}}function Se(s){return Se=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Se(s)}function Te(s){return Se(s)}function Xe(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function Qe(s){return s&&s.constructor===Symbol?"symbol":typeof s}function Ye(s,i){return i&&(Qe(i)==="object"||typeof i=="function")?i:Xe(s)}function Ke(s){var i=qe();return function(){var e=Te(s),t;if(i){var r=Te(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Ye(this,t)}}var je=require("three/examples/jsm/postprocessing/Pass"),Ee=require("three/examples/jsm/shaders/LuminosityHighPassShader"),we=function(s){"use strict";Ze(n,s);var i=Ke(n);function n(t,r,o,u){R(this,n);var a;a=i.call(this),a.strength=r!==void 0?r:1,a.radius=o,a.threshold=u,a.resolution=t!==void 0?new d.Vector2(t.x,t.y):new d.Vector2(256,256),a.clearColor=new d.Color(0,0,0);var h={minFilter:d.LinearFilter,magFilter:d.LinearFilter,format:d.RGBAFormat};a.renderTargetsHorizontal=[],a.renderTargetsVertical=[],a.nMips=5;var w=Math.round(a.resolution.x/2),P=Math.round(a.resolution.y/2);a.renderTargetBright=new d.WebGLRenderTarget(w,P,h),a.renderTargetBright.texture.name="UnrealBloomPass.bright",a.renderTargetBright.texture.generateMipmaps=!1;for(var y=0;y<a.nMips;y++){var _=new d.WebGLRenderTarget(w,P,h);_.texture.name="UnrealBloomPass.h".concat(y),_.texture.generateMipmaps=!1,a.renderTargetsHorizontal.push(_);var M=new d.WebGLRenderTarget(w,P,h);M.texture.name="UnrealBloomPass.v".concat(y),M.texture.generateMipmaps=!1,a.renderTargetsVertical.push(M),w=Math.round(w/2),P=Math.round(P/2)}Ee.LuminosityHighPassShader===void 0&&console.error("THREE.UnrealBloomPass relies on LuminosityHighPassShader");var L=Ee.LuminosityHighPassShader;a.highPassUniforms=d.UniformsUtils.clone(L.uniforms),a.highPassUniforms.luminosityThreshold.value=u,a.highPassUniforms.smoothWidth.value=.01,a.materialHighPassFilter=new d.ShaderMaterial({uniforms:a.highPassUniforms,vertexShader:L.vertexShader,fragmentShader:L.fragmentShader,defines:{}}),a.separableBlurMaterials=[];var Z=[3,5,7,9,11];w=Math.round(a.resolution.x/2),P=Math.round(a.resolution.y/2);for(var I=0;I<a.nMips;I++)a.separableBlurMaterials.push(a.getSeperableBlurMaterial(Z[I])),a.separableBlurMaterials[I].uniforms.texSize.value=new d.Vector2(w,P),w=Math.round(w/2),P=Math.round(P/2);a.compositeMaterial=a.getCompositeMaterial(a.nMips),a.compositeMaterial.uniforms.blurTexture1.value=a.renderTargetsVertical[0].texture,a.compositeMaterial.uniforms.blurTexture2.value=a.renderTargetsVertical[1].texture,a.compositeMaterial.uniforms.blurTexture3.value=a.renderTargetsVertical[2].texture,a.compositeMaterial.uniforms.blurTexture4.value=a.renderTargetsVertical[3].texture,a.compositeMaterial.uniforms.blurTexture5.value=a.renderTargetsVertical[4].texture,a.compositeMaterial.uniforms.bloomStrength.value=r,a.compositeMaterial.uniforms.bloomRadius.value=.1,a.compositeMaterial.needsUpdate=!0;var ae=[1,.8,.6,.4,.2];a.compositeMaterial.uniforms.bloomFactors.value=ae,a.bloomTintColors=[new d.Vector3(1,1,1),new d.Vector3(1,1,1),new d.Vector3(1,1,1),new d.Vector3(1,1,1),new d.Vector3(1,1,1)],a.compositeMaterial.uniforms.bloomTintColors.value=a.bloomTintColors,ue.CopyShader===void 0&&console.error("THREE.UnrealBloomPass relies on CopyShader");var k=ue.CopyShader;return a.copyUniforms=d.UniformsUtils.clone(k.uniforms),a.copyUniforms.opacity.value=1,a.materialCopy=new d.ShaderMaterial({uniforms:a.copyUniforms,vertexShader:k.vertexShader,fragmentShader:k.fragmentShader,blending:d.AdditiveBlending,depthTest:!1,depthWrite:!1,transparent:!0}),a.enabled=!0,a.needsSwap=!1,a._oldClearColor=new d.Color,a.oldClearAlpha=1,a.basic=new d.MeshBasicMaterial,a.fsQuad=new je.FullScreenQuad(void 0),a}var e=n.prototype;return e.dispose=function(){for(var r=0;r<this.renderTargetsHorizontal.length;r++)this.renderTargetsHorizontal[r].dispose();for(var o=0;o<this.renderTargetsVertical.length;o++)this.renderTargetsVertical[o].dispose();this.renderTargetBright.dispose()},e.setSize=function(r,o){var u=Math.round(r/2),a=Math.round(o/2);this.renderTargetBright.setSize(u,a);for(var h=0;h<this.nMips;h++)this.renderTargetsHorizontal[h].setSize(u,a),this.renderTargetsVertical[h].setSize(u,a),this.separableBlurMaterials[h].uniforms.texSize.value=new d.Vector2(u,a),u=Math.round(u/2),a=Math.round(a/2)},e.render=function(r,o,u,a,h){r.getClearColor(this._oldClearColor),this.oldClearAlpha=r.getClearAlpha();var w=r.autoClear;r.autoClear=!1,r.setClearColor(this.clearColor,0),h&&r.state.buffers.stencil.setTest(!1),this.renderToScreen&&(this.fsQuad.material=this.basic,this.basic.map=u.texture,r.setRenderTarget(null),r.clear(),this.fsQuad.render(r)),this.highPassUniforms.tDiffuse.value=u.texture,this.highPassUniforms.luminosityThreshold.value=this.threshold,this.fsQuad.material=this.materialHighPassFilter,r.setRenderTarget(this.renderTargetBright),r.clear(),this.fsQuad.render(r);for(var P=this.renderTargetBright,y=0;y<this.nMips;y++)this.fsQuad.material=this.separableBlurMaterials[y],this.separableBlurMaterials[y].uniforms.colorTexture.value=P.texture,this.separableBlurMaterials[y].uniforms.direction.value=n.BlurDirectionX,r.setRenderTarget(this.renderTargetsHorizontal[y]),r.clear(),this.fsQuad.render(r),this.separableBlurMaterials[y].uniforms.colorTexture.value=this.renderTargetsHorizontal[y].texture,this.separableBlurMaterials[y].uniforms.direction.value=n.BlurDirectionY,r.setRenderTarget(this.renderTargetsVertical[y]),r.clear(),this.fsQuad.render(r),P=this.renderTargetsVertical[y];this.fsQuad.material=this.compositeMaterial,this.compositeMaterial.uniforms.bloomStrength.value=this.strength,this.compositeMaterial.uniforms.bloomRadius.value=this.radius,this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,r.setRenderTarget(this.renderTargetsHorizontal[0]),r.clear(),this.fsQuad.render(r),this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.renderTargetsHorizontal[0].texture,h&&r.state.buffers.stencil.setTest(!0),this.renderToScreen?(r.setRenderTarget(null),this.fsQuad.render(r)):(r.setRenderTarget(u),this.fsQuad.render(r)),r.setClearColor(this._oldClearColor,this.oldClearAlpha),r.autoClear=w},e.getSeperableBlurMaterial=function(r){return new d.ShaderMaterial({defines:{KERNEL_RADIUS:r,SIGMA:r},uniforms:{colorTexture:{value:null},texSize:{value:new d.Vector2(.5,.5)},direction:{value:new d.Vector2(.5,.5)}},vertexShader:`varying vec2 vUv;
1
+ (function(){var Te={187:function(x){"use strict";var _=typeof Reflect=="object"?Reflect:null,c=_&&typeof _.apply=="function"?_.apply:function(o,p,m){return Function.prototype.apply.call(o,p,m)},y;_&&typeof _.ownKeys=="function"?y=_.ownKeys:Object.getOwnPropertySymbols?y=function(o){return Object.getOwnPropertyNames(o).concat(Object.getOwnPropertySymbols(o))}:y=function(o){return Object.getOwnPropertyNames(o)};function P(u){console&&console.warn&&console.warn(u)}var f=Number.isNaN||function(o){return o!==o};function s(){s.init.call(this)}x.exports=s,x.exports.once=D,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var n=10;function O(u){if(typeof u!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof u)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return n},set:function(u){if(typeof u!="number"||u<0||f(u))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+u+".");n=u}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(o){if(typeof o!="number"||o<0||f(o))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+o+".");return this._maxListeners=o,this};function S(u){return u._maxListeners===void 0?s.defaultMaxListeners:u._maxListeners}s.prototype.getMaxListeners=function(){return S(this)},s.prototype.emit=function(o){for(var p=[],m=1;m<arguments.length;m++)p.push(arguments[m]);var T=o==="error",U=this._events;if(U!==void 0)T=T&&U.error===void 0;else if(!T)return!1;if(T){var G;if(p.length>0&&(G=p[0]),G instanceof Error)throw G;var X=new Error("Unhandled error."+(G?" ("+G.message+")":""));throw X.context=G,X}var ie=U[o];if(ie===void 0)return!1;if(typeof ie=="function")c(ie,this,p);else for(var ue=ie.length,ce=Q(ie,ue),m=0;m<ue;++m)c(ce[m],this,p);return!0};function M(u,o,p,m){var T,U,G;if(O(p),U=u._events,U===void 0?(U=u._events=Object.create(null),u._eventsCount=0):(U.newListener!==void 0&&(u.emit("newListener",o,p.listener?p.listener:p),U=u._events),G=U[o]),G===void 0)G=U[o]=p,++u._eventsCount;else if(typeof G=="function"?G=U[o]=m?[p,G]:[G,p]:m?G.unshift(p):G.push(p),T=S(u),T>0&&G.length>T&&!G.warned){G.warned=!0;var X=new Error("Possible EventEmitter memory leak detected. "+G.length+" "+String(o)+" listeners added. Use emitter.setMaxListeners() to increase limit");X.name="MaxListenersExceededWarning",X.emitter=u,X.type=o,X.count=G.length,P(X)}return u}s.prototype.addListener=function(o,p){return M(this,o,p,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(o,p){return M(this,o,p,!0)};function N(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function V(u,o,p){var m={fired:!1,wrapFn:void 0,target:u,type:o,listener:p},T=N.bind(m);return T.listener=p,m.wrapFn=T,T}s.prototype.once=function(o,p){return O(p),this.on(o,V(this,o,p)),this},s.prototype.prependOnceListener=function(o,p){return O(p),this.prependListener(o,V(this,o,p)),this},s.prototype.removeListener=function(o,p){var m,T,U,G,X;if(O(p),T=this._events,T===void 0)return this;if(m=T[o],m===void 0)return this;if(m===p||m.listener===p)--this._eventsCount===0?this._events=Object.create(null):(delete T[o],T.removeListener&&this.emit("removeListener",o,m.listener||p));else if(typeof m!="function"){for(U=-1,G=m.length-1;G>=0;G--)if(m[G]===p||m[G].listener===p){X=m[G].listener,U=G;break}if(U<0)return this;U===0?m.shift():q(m,U),m.length===1&&(T[o]=m[0]),T.removeListener!==void 0&&this.emit("removeListener",o,X||p)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(o){var p,m,T;if(m=this._events,m===void 0)return this;if(m.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):m[o]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete m[o]),this;if(arguments.length===0){var U=Object.keys(m),G;for(T=0;T<U.length;++T)G=U[T],G!=="removeListener"&&this.removeAllListeners(G);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(p=m[o],typeof p=="function")this.removeListener(o,p);else if(p!==void 0)for(T=p.length-1;T>=0;T--)this.removeListener(o,p[T]);return this};function F(u,o,p){var m=u._events;if(m===void 0)return[];var T=m[o];return T===void 0?[]:typeof T=="function"?p?[T.listener||T]:[T]:p?k(T):Q(T,T.length)}s.prototype.listeners=function(o){return F(this,o,!0)},s.prototype.rawListeners=function(o){return F(this,o,!1)},s.listenerCount=function(u,o){return typeof u.listenerCount=="function"?u.listenerCount(o):K.call(u,o)},s.prototype.listenerCount=K;function K(u){var o=this._events;if(o!==void 0){var p=o[u];if(typeof p=="function")return 1;if(p!==void 0)return p.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?y(this._events):[]};function Q(u,o){for(var p=new Array(o),m=0;m<o;++m)p[m]=u[m];return p}function q(u,o){for(;o+1<u.length;o++)u[o]=u[o+1];u.pop()}function k(u){for(var o=new Array(u.length),p=0;p<o.length;++p)o[p]=u[p].listener||u[p];return o}function D(u,o){return new Promise(function(p,m){function T(G){u.removeListener(o,U),m(G)}function U(){typeof u.removeListener=="function"&&u.removeListener("error",T),p([].slice.call(arguments))}C(u,o,U,{once:!0}),o!=="error"&&R(u,T,{once:!0})})}function R(u,o,p){typeof u.on=="function"&&C(u,"error",o,p)}function C(u,o,p,m){if(typeof u.on=="function")m.once?u.once(o,p):u.on(o,p);else if(typeof u.addEventListener=="function")u.addEventListener(o,function T(U){m.once&&u.removeEventListener(o,T),p(U)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof u)}},666:function(x){var _=function(c){"use strict";var y=Object.prototype,P=y.hasOwnProperty,f,s=typeof Symbol=="function"?Symbol:{},n=s.iterator||"@@iterator",O=s.asyncIterator||"@@asyncIterator",S=s.toStringTag||"@@toStringTag";function M(v,h,w){return Object.defineProperty(v,h,{value:w,enumerable:!0,configurable:!0,writable:!0}),v[h]}try{M({},"")}catch(v){M=function(h,w,B){return h[w]=B}}function N(v,h,w,B){var L=h&&h.prototype instanceof D?h:D,Y=Object.create(L.prototype),ee=new ce(B||[]);return Y._invoke=G(v,w,ee),Y}c.wrap=N;function V(v,h,w){try{return{type:"normal",arg:v.call(h,w)}}catch(B){return{type:"throw",arg:B}}}var F="suspendedStart",K="suspendedYield",Q="executing",q="completed",k={};function D(){}function R(){}function C(){}var u={};M(u,n,function(){return this});var o=Object.getPrototypeOf,p=o&&o(o(fe([])));p&&p!==y&&P.call(p,n)&&(u=p);var m=C.prototype=D.prototype=Object.create(u);R.prototype=C,M(m,"constructor",C),M(C,"constructor",R),R.displayName=M(C,S,"GeneratorFunction");function T(v){["next","throw","return"].forEach(function(h){M(v,h,function(w){return this._invoke(h,w)})})}c.isGeneratorFunction=function(v){var h=typeof v=="function"&&v.constructor;return h?h===R||(h.displayName||h.name)==="GeneratorFunction":!1},c.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,C):(v.__proto__=C,M(v,S,"GeneratorFunction")),v.prototype=Object.create(m),v},c.awrap=function(v){return{__await:v}};function U(v,h){function w(Y,ee,te,ne){var re=V(v[Y],v,ee);if(re.type==="throw")ne(re.arg);else{var he=re.arg,de=he.value;return de&&typeof de=="object"&&P.call(de,"__await")?h.resolve(de.__await).then(function(le){w("next",le,te,ne)},function(le){w("throw",le,te,ne)}):h.resolve(de).then(function(le){he.value=le,te(he)},function(le){return w("throw",le,te,ne)})}}var B;function L(Y,ee){function te(){return new h(function(ne,re){w(Y,ee,ne,re)})}return B=B?B.then(te,te):te()}this._invoke=L}T(U.prototype),M(U.prototype,O,function(){return this}),c.AsyncIterator=U,c.async=function(v,h,w,B,L){L===void 0&&(L=Promise);var Y=new U(N(v,h,w,B),L);return c.isGeneratorFunction(h)?Y:Y.next().then(function(ee){return ee.done?ee.value:Y.next()})};function G(v,h,w){var B=F;return function(Y,ee){if(B===Q)throw new Error("Generator is already running");if(B===q){if(Y==="throw")throw ee;return ge()}for(w.method=Y,w.arg=ee;;){var te=w.delegate;if(te){var ne=X(te,w);if(ne){if(ne===k)continue;return ne}}if(w.method==="next")w.sent=w._sent=w.arg;else if(w.method==="throw"){if(B===F)throw B=q,w.arg;w.dispatchException(w.arg)}else w.method==="return"&&w.abrupt("return",w.arg);B=Q;var re=V(v,h,w);if(re.type==="normal"){if(B=w.done?q:K,re.arg===k)continue;return{value:re.arg,done:w.done}}else re.type==="throw"&&(B=q,w.method="throw",w.arg=re.arg)}}}function X(v,h){var w=v.iterator[h.method];if(w===f){if(h.delegate=null,h.method==="throw"){if(v.iterator.return&&(h.method="return",h.arg=f,X(v,h),h.method==="throw"))return k;h.method="throw",h.arg=new TypeError("The iterator does not provide a 'throw' method")}return k}var B=V(w,v.iterator,h.arg);if(B.type==="throw")return h.method="throw",h.arg=B.arg,h.delegate=null,k;var L=B.arg;if(!L)return h.method="throw",h.arg=new TypeError("iterator result is not an object"),h.delegate=null,k;if(L.done)h[v.resultName]=L.value,h.next=v.nextLoc,h.method!=="return"&&(h.method="next",h.arg=f);else return L;return h.delegate=null,k}T(m),M(m,S,"Generator"),M(m,n,function(){return this}),M(m,"toString",function(){return"[object Generator]"});function ie(v){var h={tryLoc:v[0]};1 in v&&(h.catchLoc=v[1]),2 in v&&(h.finallyLoc=v[2],h.afterLoc=v[3]),this.tryEntries.push(h)}function ue(v){var h=v.completion||{};h.type="normal",delete h.arg,v.completion=h}function ce(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(ie,this),this.reset(!0)}c.keys=function(v){var h=[];for(var w in v)h.push(w);return h.reverse(),function B(){for(;h.length;){var L=h.pop();if(L in v)return B.value=L,B.done=!1,B}return B.done=!0,B}};function fe(v){if(v){var h=v[n];if(h)return h.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var w=-1,B=function L(){for(;++w<v.length;)if(P.call(v,w))return L.value=v[w],L.done=!1,L;return L.value=f,L.done=!0,L};return B.next=B}}return{next:ge}}c.values=fe;function ge(){return{value:f,done:!0}}return ce.prototype={constructor:ce,reset:function(v){if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,this.tryEntries.forEach(ue),!v)for(var h in this)h.charAt(0)==="t"&&P.call(this,h)&&!isNaN(+h.slice(1))&&(this[h]=f)},stop:function(){this.done=!0;var v=this.tryEntries[0],h=v.completion;if(h.type==="throw")throw h.arg;return this.rval},dispatchException:function(v){if(this.done)throw v;var h=this;function w(ne,re){return Y.type="throw",Y.arg=v,h.next=ne,re&&(h.method="next",h.arg=f),!!re}for(var B=this.tryEntries.length-1;B>=0;--B){var L=this.tryEntries[B],Y=L.completion;if(L.tryLoc==="root")return w("end");if(L.tryLoc<=this.prev){var ee=P.call(L,"catchLoc"),te=P.call(L,"finallyLoc");if(ee&&te){if(this.prev<L.catchLoc)return w(L.catchLoc,!0);if(this.prev<L.finallyLoc)return w(L.finallyLoc)}else if(ee){if(this.prev<L.catchLoc)return w(L.catchLoc,!0)}else if(te){if(this.prev<L.finallyLoc)return w(L.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(v,h){for(var w=this.tryEntries.length-1;w>=0;--w){var B=this.tryEntries[w];if(B.tryLoc<=this.prev&&P.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var L=B;break}}L&&(v==="break"||v==="continue")&&L.tryLoc<=h&&h<=L.finallyLoc&&(L=null);var Y=L?L.completion:{};return Y.type=v,Y.arg=h,L?(this.method="next",this.next=L.finallyLoc,k):this.complete(Y)},complete:function(v,h){if(v.type==="throw")throw v.arg;return v.type==="break"||v.type==="continue"?this.next=v.arg:v.type==="return"?(this.rval=this.arg=v.arg,this.method="return",this.next="end"):v.type==="normal"&&h&&(this.next=h),k},finish:function(v){for(var h=this.tryEntries.length-1;h>=0;--h){var w=this.tryEntries[h];if(w.finallyLoc===v)return this.complete(w.completion,w.afterLoc),ue(w),k}},catch:function(v){for(var h=this.tryEntries.length-1;h>=0;--h){var w=this.tryEntries[h];if(w.tryLoc===v){var B=w.completion;if(B.type==="throw"){var L=B.arg;ue(w)}return L}}throw new Error("illegal catch attempt")},delegateYield:function(v,h,w){return this.delegate={iterator:fe(v),resultName:h,nextLoc:w},this.method==="next"&&(this.arg=f),k}},c}(x.exports);try{regeneratorRuntime=_}catch(c){typeof globalThis=="object"?globalThis.regeneratorRuntime=_:Function("r","regeneratorRuntime = r")(_)}},701:function(x,_,c){"use strict";c.d(_,{ZP:function(){return q}});var y=c(438),P=c(998);function f(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(k){return!1}}function s(k,D,R){return f()?s=Reflect.construct:s=function(u,o,p){var m=[null];m.push.apply(m,o);var T=Function.bind.apply(u,m),U=new T;return p&&(0,P.Z)(U,p.prototype),U},s.apply(null,arguments)}function n(k,D,R){return s.apply(null,arguments)}var O=c(951),S=c(342),M=c(644),N=c(282),V=require("three/examples/jsm/renderers/CSS2DRenderer"),F=c(530),K=c(519),Q=function(k){k&&((0,K.disposeMesh)(k),k.children.forEach(function(D){D.userData.BaseObject_||Q(D)}))},q=function(){"use strict";function k(){(0,y.Z)(this,k),this.objecttype__="BaseObject",this.userData={},this.pm=(0,N.Z)(),this.visible=!1}var D=k.prototype;return D.init=function(){},D.create=function(){},D.render=function(){},D.update=function(C,u){},D.resize=function(C,u){},D.show=function(){return this.object3d&&(this.object3d.visible=!0),this.visible=!0,this},D.hide=function(){return this.object3d&&(this.object3d.visible=!1),this.visible=!1,this},D.isVisible=function(){return this.visible},D.createMesh=function(){for(var C=arguments.length,u=new Array(C),o=0;o<C;o++)u[o]=arguments[o];return this.object3d=n(M.Mesh,(0,S.Z)(u)),this},D.createGroup=function(){return this.object3d=new M.Group,this},D.createPoints=function(){for(var C=arguments.length,u=new Array(C),o=0;o<C;o++)u[o]=arguments[o];return this.object3d=n(M.Points,(0,S.Z)(u)),this},D.createCSS2DObject=function(C){return this.object3d=new V.CSS2DObject(C),this},D.createCSS3DObject=function(C){return this.object3d=new F.CSS3DObject(C),this},D.createCSS3DSprite=function(C){return this.object3d=new F.CSS3DSprite(C),this},D.createSprite=function(C){return this.object3d=new M.Sprite(C),this},D.add=function(){for(var C=arguments.length,u=new Array(C),o=0;o<C;o++)u[o]=arguments[o];var p;return(p=this.object3d).add.apply(p,(0,S.Z)(u)),this},D.remove=function(){for(var C=arguments.length,u=new Array(C),o=0;o<C;o++)u[o]=arguments[o];var p;return(p=this.object3d).remove.apply(p,(0,S.Z)(u)),this},D.getSize=function(){var C=new M.Box3().setFromObject(this.object3d);return{min:C.min,max:C.max,size:C.getSize(new M.Vector3)}},D.traverse=function(C){C(this),this.children.forEach(function(u){u.traverse(C)})},D.dispose=function(){Q(this.object3d)},(0,O.Z)(k,[{key:"parent",get:function(){var C=this.object3d.parent;return(C==null?void 0:C.userData.BaseObject_)||this.pencil.scene}},{key:"children",get:function(){return this.object3d.children.map(function(C){return C.userData.BaseObject_}).filter(function(C){return!!C})}}]),k}()},896:function(x,_,c){"use strict";c.d(_,{Z:function(){return P}});var y=c(438),P=function(){"use strict";function f(n){(0,y.Z)(this,f),this.guiParams={},n&&(this.guiParams=n)}var s=f.prototype;return s.showGui=function(O){var S=this;!O||Object.keys(this.guiParams).forEach(function(M){var N=O.addFolder(M),V=S.guiParams[M];Object.keys(V).forEach(function(F){var K=V[F],Q=K.min,q=K.max,k=K.step,D=K.name,R=K.paramMap,C=K.items,u=K.value,o=K.target,p=F.toLowerCase().indexOf("color")>-1,m,T=typeof u=="undefined"&&o,U=T?o():V[F],G=T?F:"value";C?m=N.add(U,G,C):p?m=N.addColor(U,G):m=N.add(U,G),m=m.name(D||F),typeof Q!="undefined"&&(m=m.min(Q)),typeof q!="undefined"&&(m=m.max(q)),typeof k!="undefined"&&(m=m.step(k)),m=m.onChange(function(){S.setTargetValue(M,F,U[G],R)}),T&&m.listen()})})},s.setTargetValue=function(O,S,M,N){var V=this.guiParams[O][S],F=V.onChange,K=V.target,Q=V.value,q=S.toLowerCase().indexOf("color")>-1,k=typeof Q=="undefined"&&K;if(K&&!k){var D=K();Array.isArray(D)||(D=[D]),D.forEach(function(R){if(!!R)if(q)try{R[N||S].set(M)}catch(C){S!=="color"&&!N&&console.warn("".concat(S," is not a color,set paramMap"))}else R[N||S]=M})}F&&F(M)},s.setTargetValueByParams=function(){var O=this;Object.keys(this.guiParams).forEach(function(S){Object.keys(O.guiParams[S]).forEach(function(M){var N=O.guiParams[S][M];typeof N.value!="undefined"&&O.setTargetValue(S,M,N.value,N.paramMap)})})},f}()},695:function(x,_,c){"use strict";c.d(_,{Z:function(){return y}});function y(P){if(P.geometry&&P.geometry.dispose(),P.material){var f=Array.isArray(P.material)?P.material:[P.material];f.forEach(function(s){var n,O,S,M,N,V,F,K,Q,q,k,D,R;(n=s.map)===null||n===void 0||n.dispose(),(O=s.lightMap)===null||O===void 0||O.dispose(),(S=s.bumpMap)===null||S===void 0||S.dispose(),(M=s.normalMap)===null||M===void 0||M.dispose(),(N=s.specularMap)===null||N===void 0||N.dispose(),(V=s.envMap)===null||V===void 0||V.dispose(),(F=s.alphaMap)===null||F===void 0||F.dispose(),(K=s.aoMap)===null||K===void 0||K.dispose(),(Q=s.displacementMap)===null||Q===void 0||Q.dispose(),(q=s.emissiveMap)===null||q===void 0||q.dispose(),(k=s.gradientMap)===null||k===void 0||k.dispose(),(D=s.metalnessMap)===null||D===void 0||D.dispose(),(R=s.roughnessMap)===null||R===void 0||R.dispose(),s.dispose()})}}},519:function(x,_,c){"use strict";c.d(_,{disposeMesh:function(){return s.Z},isPlainObject:function(){return S.Z}});var y=c(666),P=c.n(y),f=null,s=c(695),n=c(644);function O(k){if(k.material){var D=Array.isArray(k.material)?k.material:[k.material];D.forEach(function(R){var C,u;(C=R.color)===null||C===void 0||C.convertSRGBToLinear(),(u=R.emissive)===null||u===void 0||u.convertSRGBToLinear(),R.map&&(R.map.encoding=THREE.sRGBEncoding),R.emissiveMap&&(R.emissiveMap.encoding=THREE.sRGBEncoding)})}}var S=c(738),M=c(568),N=c(924),V=require("idb-keyval"),F=c(484),K=null,Q=null,q=function(){var k=(0,M.Z)(P().mark(function D(R,C){var u,o,p,m,T,U;return P().wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return u=C.version,X.next=4,(0,V.get)(R);case 4:if(p=X.sent,!(p&&p[u])){X.next=9;break}o=p[u],X.next=15;break;case 9:return X.next=11,(0,F.Z)(fetch(R).then(function(ie){if(ie.ok)return ie.blob();throw new Error}));case 11:m=X.sent,T=m.res,U=m.err,U||(o=T,(0,V.set)(R,(0,N.Z)({},u,T)));case 15:return X.abrupt("return",o?{url:URL.createObjectURL(o)}:{url:R});case 16:case"end":return X.stop()}},D)}));return function(R,C){return k.apply(this,arguments)}}()},738:function(x,_,c){"use strict";c.d(_,{Z:function(){return P}});function y(f){return Object.prototype.toString.call(f)==="[object Object]"}function P(f){if(y(f)===!1)return!1;var s=f.constructor;if(s===void 0)return!0;var n=s.prototype;return!(y(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)}},282:function(x,_,c){"use strict";c.d(_,{Z:function(){return P}});var y=c(484);function P(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n={};return n.promise=new Promise(function(O,S){n.resolve=O,n.reject=S}),f&&(n.promise=(0,y.Z)(n.promise,s)),n}},484:function(x,_,c){"use strict";c.d(_,{Z:function(){return P}});var y=c(42);function P(f){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return f.then(function(n){return(0,y.Z)({err:null,res:n},s)}).catch(function(n){return(0,y.Z)({err:n,res:void 0},s)})}},494:function(x){"use strict";x.exports=require("@tweenjs/tween.js")},644:function(x){"use strict";x.exports=require("three")},530:function(x){"use strict";x.exports=require("three/examples/jsm/renderers/CSS3DRenderer")},943:function(x,_,c){"use strict";c.d(_,{Z:function(){return y}});function y(P,f){(f==null||f>P.length)&&(f=P.length);for(var s=0,n=new Array(f);s<f;s++)n[s]=P[s];return n}},982:function(x,_,c){"use strict";c.d(_,{Z:function(){return P}});var y=c(943);function P(f){if(Array.isArray(f))return(0,y.Z)(f)}},111:function(x,_,c){"use strict";c.d(_,{Z:function(){return y}});function y(P){if(P===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P}},568:function(x,_,c){"use strict";c.d(_,{Z:function(){return P}});function y(f,s,n,O,S,M,N){try{var V=f[M](N),F=V.value}catch(K){n(K);return}V.done?s(F):Promise.resolve(F).then(O,S)}function P(f){return function(){var s=this,n=arguments;return new Promise(function(O,S){var M=f.apply(s,n);function N(F){y(M,O,S,N,V,"next",F)}function V(F){y(M,O,S,N,V,"throw",F)}N(void 0)})}}},438:function(x,_,c){"use strict";c.d(_,{Z:function(){return y}});function y(P,f){if(!(P instanceof f))throw new TypeError("Cannot call a class as a function")}},951:function(x,_,c){"use strict";c.d(_,{Z:function(){return P}});function y(f,s){for(var n=0;n<s.length;n++){var O=s[n];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(f,O.key,O)}}function P(f,s,n){return s&&y(f.prototype,s),n&&y(f,n),f}},485:function(x,_,c){"use strict";c.d(_,{Z:function(){return O}});function y(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(S){return!1}}var P=c(662),f=c(111);function s(S){return S&&S.constructor===Symbol?"symbol":typeof S}function n(S,M){return M&&(s(M)==="object"||typeof M=="function")?M:(0,f.Z)(S)}function O(S){var M=y();return function(){var V=(0,P.Z)(S),F;if(M){var K=(0,P.Z)(this).constructor;F=Reflect.construct(V,arguments,K)}else F=V.apply(this,arguments);return n(this,F)}}},924:function(x,_,c){"use strict";c.d(_,{Z:function(){return y}});function y(P,f,s){return f in P?Object.defineProperty(P,f,{value:s,enumerable:!0,configurable:!0,writable:!0}):P[f]=s,P}},662:function(x,_,c){"use strict";c.d(_,{Z:function(){return P}});function y(f){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},y(f)}function P(f){return y(f)}},668:function(x,_,c){"use strict";c.d(_,{Z:function(){return P}});var y=c(998);function P(f,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(s&&s.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),s&&(0,y.Z)(f,s)}},375:function(x,_,c){"use strict";c.d(_,{Z:function(){return y}});function y(P){if(typeof Symbol!="undefined"&&P[Symbol.iterator]!=null||P["@@iterator"]!=null)return Array.from(P)}},270:function(x,_,c){"use strict";c.d(_,{Z:function(){return y}});function y(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},42:function(x,_,c){"use strict";c.d(_,{Z:function(){return P}});var y=c(924);function P(f){for(var s=1;s<arguments.length;s++){var n=arguments[s]!=null?arguments[s]:{},O=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(O=O.concat(Object.getOwnPropertySymbols(n).filter(function(S){return Object.getOwnPropertyDescriptor(n,S).enumerable}))),O.forEach(function(S){(0,y.Z)(f,S,n[S])})}return f}},396:function(x,_,c){"use strict";c.d(_,{Z:function(){return P}});function y(f,s){var n=Object.keys(f);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(f);s&&(O=O.filter(function(S){return Object.getOwnPropertyDescriptor(f,S).enumerable})),n.push.apply(n,O)}return n}function P(f,s){return s=s!=null?s:{},Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(s)):y(Object(s)).forEach(function(n){Object.defineProperty(f,n,Object.getOwnPropertyDescriptor(s,n))}),f}},607:function(x,_,c){"use strict";c.d(_,{Z:function(){return P}});function y(f,s){if(f==null)return{};var n={},O=Object.keys(f),S,M;for(M=0;M<O.length;M++)S=O[M],!(s.indexOf(S)>=0)&&(n[S]=f[S]);return n}function P(f,s){if(f==null)return{};var n=y(f,s),O,S;if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(f);for(S=0;S<M.length;S++)O=M[S],!(s.indexOf(O)>=0)&&(!Object.prototype.propertyIsEnumerable.call(f,O)||(n[O]=f[O]))}return n}},998:function(x,_,c){"use strict";c.d(_,{Z:function(){return P}});function y(f,s){return y=Object.setPrototypeOf||function(O,S){return O.__proto__=S,O},y(f,s)}function P(f,s){return y(f,s)}},342:function(x,_,c){"use strict";c.d(_,{Z:function(){return n}});var y=c(982),P=c(375),f=c(270),s=c(566);function n(O){return(0,y.Z)(O)||(0,P.Z)(O)||(0,s.Z)(O)||(0,f.Z)()}},566:function(x,_,c){"use strict";c.d(_,{Z:function(){return P}});var y=c(943);function P(f,s){if(!!f){if(typeof f=="string")return(0,y.Z)(f,s);var n=Object.prototype.toString.call(f).slice(8,-1);if(n==="Object"&&f.constructor&&(n=f.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return(0,y.Z)(f,s)}}}},Se={};function H(x){var _=Se[x];if(_!==void 0)return _.exports;var c=Se[x]={exports:{}};return Te[x](c,c.exports,H),c.exports}(function(){H.n=function(x){var _=x&&x.__esModule?function(){return x.default}:function(){return x};return H.d(_,{a:_}),_}})(),function(){H.d=function(x,_){for(var c in _)H.o(_,c)&&!H.o(x,c)&&Object.defineProperty(x,c,{enumerable:!0,get:_[c]})}}(),function(){H.o=function(x,_){return Object.prototype.hasOwnProperty.call(x,_)}}(),function(){H.r=function(x){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(x,"__esModule",{value:!0})}}(),function(){H.p="/"}();var be={};(function(){"use strict";H.r(be),H.d(be,{BaseObject:function(){return Qe.ZP},GUIObject:function(){return Q.Z},Pencil:function(){return ye},default:function(){return ye}});var x=H(438),_=H(951),c=H(42),y=H(396),P=H(342),f=H(494),s=H.n(f),n=H(644),O=H(187),S=require("deepmerge"),M=H.n(S),N=require("three/examples/jsm/libs/stats.module"),V=H.n(N),F=require("lil-gui"),K=H.n(F),Q=H(896),q={None:n.NoToneMapping,Linear:n.LinearToneMapping,Reinhard:n.ReinhardToneMapping,Cineon:n.CineonToneMapping,ACESFilmic:n.ACESFilmicToneMapping},k={antialias:!1,devicePixelRatio:window.devicePixelRatio,powerPreference:"high-performance",toneMapping:"None",toneMappingExposure:1,alpha:!1,outputEncoding:n.LinearEncoding,logarithmicDepthBuffer:!1,preserveDrawingBuffer:!1},D=function(){"use strict";function z(a){(0,x.Z)(this,z),this.options=a;var e=a.width,t=a.height,r=a.rendererParams,l=r.alpha,d=r.devicePixelRatio,i=r.antialias,b=r.powerPreference,Z=r.toneMapping,j=r.toneMappingExposure,E=r.outputEncoding,A=r.logarithmicDepthBuffer,I=r.preserveDrawingBuffer,W=new n.WebGLRenderer({alpha:l,antialias:i,powerPreference:b,logarithmicDepthBuffer:A,preserveDrawingBuffer:I});W.setSize(e,t),W.setPixelRatio(d),W.autoClear=!1,W.toneMapping=q[Z],W.toneMappingExposure=j,W.outputEncoding=E,this.renderer=W}var g=z.prototype;return g.setSize=function(e,t){this.renderer.setSize(e,t)},g.render=function(){var e=this.options,t=e.scene,r=e.camera;this.renderer.render(t,r)},g.setGui=function(e){var t=this,r=new Q.Z({renderer:{toneMapping:{value:this.options.rendererParams.toneMapping,items:q,target:function(){return t.renderer}},toneMappingExposure:{value:this.options.rendererParams.toneMappingExposure,min:0,max:Math.pow(2,4),target:function(){return t.renderer}}}});r.showGui(e)},g.dispose=function(){var e,t,r;(e=this.renderer)===null||e===void 0||e.clear(),(t=this.renderer)===null||t===void 0||t.dispose(),(r=this.renderer)===null||r===void 0||r.renderLists.dispose()},z}(),R={fov:45,near:1,far:1e3},C=function(){"use strict";function z(a){(0,x.Z)(this,z),this.oldCameraPosition=new n.Vector3,this.oldCameraRotation=new n.Euler,this.customCamera=!1,this.options=a;var e=a.width,t=a.height,r=a.cameraParams;if(r instanceof n.Camera)this.camera=r,this.customCamera=!0;else{var l=r.fov,d=r.far,i=r.near,b=new n.PerspectiveCamera(l,e/t,i,d);b.position.set(0,0,400),b.lookAt(0,0,0),this.camera=b}}var g=z.prototype;return g.checkCameraChange=function(){var e=this.camera,t=this.oldCameraPosition.equals(e.position)&&this.oldCameraRotation.equals(e.rotation);return this.oldCameraPosition=e.position.clone(),this.oldCameraRotation=e.rotation.clone(),!t},g.setSize=function(e,t){this.camera instanceof n.PerspectiveCamera&&(this.camera.aspect=e/t),this.camera.updateProjectionMatrix()},g.setGui=function(e){var t=this,r=new Q.Z({camera:{x:{min:-1e4,max:1e4,step:1,target:function(){return t.camera.position}},y:{min:-1e4,max:1e4,step:1,target:function(){return t.camera.position}},z:{min:-1e4,max:1e4,step:1,target:function(){return t.camera.position}},near:{min:0,max:1e3,step:1,target:function(){return t.camera},onChange:function(l){t.camera.updateProjectionMatrix()}},far:{min:0,max:2e4,step:1,target:function(){return t.camera},onChange:function(l){t.camera.updateProjectionMatrix()}}}});this.camera instanceof n.PerspectiveCamera&&(r.guiParams.camera.fov={min:0,max:90,step:1,target:function(){return t.camera},onChange:function(l){t.camera.updateProjectionMatrix()}}),r.showGui(e)},z}(),u=H(519),o={background:null},p=function(){"use strict";function z(a){(0,x.Z)(this,z),this.options=a;var e=a.camera,t=a.sceneParams,r=t.background,l=new n.Scene;r&&(l.background=r),l.add(e),this.scene=l}var g=z.prototype;return g.addAxesHelper=function(){var e,t=new n.AxesHelper(100);(e=this.scene)===null||e===void 0||e.add(t)},g.dispose=function(){var e;(e=this.scene)===null||e===void 0||e.traverse(function(t){(0,u.disposeMesh)(t)})},z}(),m=require("three/examples/jsm/controls/OrbitControls"),T={},U=function(){"use strict";function z(a){(0,x.Z)(this,z),this.options=a;var e=a.camera,t=a.controlParams,r=a.mapControl,l=t.domElement,d=r?new m.MapControls(e,l):new m.OrbitControls(e,l);d.minPolarAngle=Math.PI*.15,d.maxPolarAngle=Math.PI*.85,d.enableDamping=!0,d.dampingFactor=.063,d.autoRotate=!1,d.autoRotateSpeed=-60,d.enableZoom=!0,d.zoomSpeed=.2,this.control=d}var g=z.prototype;return g.limitPan=function(e){var t=e.maxX,r=t===void 0?1/0:t,l=e.minX,d=l===void 0?-1/0:l,i=e.maxZ,b=i===void 0?1/0:i,Z=e.minZ,j=Z===void 0?-1/0:Z,E=e.maxY,A=E===void 0?1/0:E,I=e.minY,W=I===void 0?-1/0:I,J=this.limitPanV||new n.Vector3,$=this.control,ae=this.options.camera,se=new n.Vector3(d,W,j),oe=new n.Vector3(r,A,b);this.limitPanV=J,J.copy($.target),$.target.clamp(se,oe),J.sub($.target),ae.position.sub(J)},g.update=function(){this.control.update()},g.dispose=function(){this.control.dispose()},z}(),G=H(530),X=new n.Vector3,ie=new n.Matrix4,ue=new n.Matrix4,ce=new n.Vector3,fe=new n.Vector3,ge=function z(){"use strict";var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,x.Z)(this,z);var a=function(I,W){return ce.setFromMatrixPosition(I.matrixWorld),fe.setFromMatrixPosition(W.matrixWorld),ce.distanceToSquared(fe)},e=function(I){var W=[];return I.traverse(function(J){J.isCSS2DObject&&W.push(J)}),W},t=function(I){for(var W=e(I).sort(function(oe,ve){if(oe.renderOrder!==ve.renderOrder)return ve.renderOrder-oe.renderOrder;var me=Z.objects.get(oe).distanceToCameraSquared,_e=Z.objects.get(ve).distanceToCameraSquared;return me-_e}),J=W.length,$=0,ae=W.length;$<ae;$++){var se=W[$].userData.zIndexFix||0;W[$].element.style.zIndex=J-$+se}},r=this,l,d,i,b,Z={objects:new WeakMap},j=g.element!==void 0?g.element:document.createElement("div");j.style.overflow="hidden",this.domElement=j,this.getSize=function(){return{width:l,height:d}},this.render=function(A,I){A.autoUpdate===!0&&A.updateMatrixWorld(),I.parent===null&&I.updateMatrixWorld(),ie.copy(I.matrixWorldInverse),ue.multiplyMatrices(I.projectionMatrix,ie),E(A,A,I),t(A)},this.setSize=function(A,I){l=A,d=I,i=l/2,b=d/2,j.style.width="".concat(A,"px"),j.style.height="".concat(I,"px")};function E(A,I,W){if(A.isCSS2DObject){X.setFromMatrixPosition(A.matrixWorld),X.applyMatrix4(ue);var J=A.visible===!0&&X.z>=-1&&X.z<=1&&A.layers.test(W.layers)===!0;if(A.element.style.display=J===!0?"":"none",J===!0){A.onBeforeRender(r,I,W);var $=A.element;$.style.transform="translate(-50%,-50%) translate(".concat(X.x*i+i,"px,").concat(-X.y*b+b,"px)"),$.parentNode!==j&&j.appendChild($),A.onAfterRender(r,I,W)}var ae={distanceToCameraSquared:a(W,A)};Z.objects.set(A,ae)}for(var se=0,oe=A.children.length;se<oe;se++)E(A.children[se],I,W)}},v={zIndex:"auto"},h=function(){"use strict";function z(a){(0,x.Z)(this,z),this.container=a}var g=z.prototype;return g.addRenderer=function(e,t){var r=this.container,l=r.offsetWidth,d=r.offsetHeight,i=e==="css2d"?new ge:new G.CSS3DRenderer;i.domElement.style.position="absolute",i.domElement.style.top="0",i.domElement.style.pointerEvents="none",i.domElement.style.zIndex=t.zIndex,i.setSize(l,d),r.appendChild(i.domElement),e==="css2d"?this.css2Drenderer=i:e==="css3d"&&(this.css3Drenderer=i)},g.setSize=function(e,t){var r,l;(r=this.css2Drenderer)===null||r===void 0||r.setSize(e,t),(l=this.css3Drenderer)===null||l===void 0||l.setSize(e,t)},g.render=function(e,t){var r,l;(r=this.css2Drenderer)===null||r===void 0||r.render(e,t),(l=this.css3Drenderer)===null||l===void 0||l.render(e,t)},g.dispose=function(){this.css2Drenderer=void 0,this.css3Drenderer=void 0},z}(),w=require("three/examples/jsm/postprocessing/EffectComposer"),B=require("three/examples/jsm/postprocessing/RenderPass"),L=require("three/examples/jsm/postprocessing/ShaderPass"),Y=require("three/examples/jsm/shaders/CopyShader"),ee=require("three/examples/jsm/shaders/GammaCorrectionShader"),te=require("three/examples/jsm/postprocessing/SMAAPass"),ne=require("three/examples/jsm/postprocessing/SSAARenderPass"),re=require("three/examples/jsm/shaders/FXAAShader"),he=function(){try{var z=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&z.getContext("webgl2"))}catch(g){return!1}},de=0,le=1,pe=!1,Ce=he()!==!1,je=H.p+"static/media/vertex.cc08e9108dec6da9504a.glsl",Le=H.p+"static/media/fragment.2913fac3481dac4d4a06.glsl",Ae=H(668),De=H(485),xe=require("three/examples/jsm/postprocessing/Pass"),Oe=require("three/examples/jsm/shaders/LuminosityHighPassShader"),Pe=function(z){"use strict";(0,Ae.Z)(a,z);var g=(0,De.Z)(a);function a(t,r,l,d){(0,x.Z)(this,a);var i;i=g.call(this),i.strength=r!==void 0?r:1,i.radius=l,i.threshold=d,i.resolution=t!==void 0?new n.Vector2(t.x,t.y):new n.Vector2(256,256),i.clearColor=new n.Color(0,0,0);var b={minFilter:n.LinearFilter,magFilter:n.LinearFilter,format:n.RGBAFormat};i.renderTargetsHorizontal=[],i.renderTargetsVertical=[],i.nMips=5;var Z=Math.round(i.resolution.x/2),j=Math.round(i.resolution.y/2);i.renderTargetBright=new n.WebGLRenderTarget(Z,j,b),i.renderTargetBright.texture.name="UnrealBloomPass.bright",i.renderTargetBright.texture.generateMipmaps=!1;for(var E=0;E<i.nMips;E++){var A=new n.WebGLRenderTarget(Z,j,b);A.texture.name="UnrealBloomPass.h".concat(E),A.texture.generateMipmaps=!1,i.renderTargetsHorizontal.push(A);var I=new n.WebGLRenderTarget(Z,j,b);I.texture.name="UnrealBloomPass.v".concat(E),I.texture.generateMipmaps=!1,i.renderTargetsVertical.push(I),Z=Math.round(Z/2),j=Math.round(j/2)}Oe.LuminosityHighPassShader===void 0&&console.error("THREE.UnrealBloomPass relies on LuminosityHighPassShader");var W=Oe.LuminosityHighPassShader;i.highPassUniforms=n.UniformsUtils.clone(W.uniforms),i.highPassUniforms.luminosityThreshold.value=d,i.highPassUniforms.smoothWidth.value=.01,i.materialHighPassFilter=new n.ShaderMaterial({uniforms:i.highPassUniforms,vertexShader:W.vertexShader,fragmentShader:W.fragmentShader,defines:{}}),i.separableBlurMaterials=[];var J=[3,5,7,9,11];Z=Math.round(i.resolution.x/2),j=Math.round(i.resolution.y/2);for(var $=0;$<i.nMips;$++)i.separableBlurMaterials.push(i.getSeperableBlurMaterial(J[$])),i.separableBlurMaterials[$].uniforms.texSize.value=new n.Vector2(Z,j),Z=Math.round(Z/2),j=Math.round(j/2);i.compositeMaterial=i.getCompositeMaterial(i.nMips),i.compositeMaterial.uniforms.blurTexture1.value=i.renderTargetsVertical[0].texture,i.compositeMaterial.uniforms.blurTexture2.value=i.renderTargetsVertical[1].texture,i.compositeMaterial.uniforms.blurTexture3.value=i.renderTargetsVertical[2].texture,i.compositeMaterial.uniforms.blurTexture4.value=i.renderTargetsVertical[3].texture,i.compositeMaterial.uniforms.blurTexture5.value=i.renderTargetsVertical[4].texture,i.compositeMaterial.uniforms.bloomStrength.value=r,i.compositeMaterial.uniforms.bloomRadius.value=.1,i.compositeMaterial.needsUpdate=!0;var ae=[1,.8,.6,.4,.2];i.compositeMaterial.uniforms.bloomFactors.value=ae,i.bloomTintColors=[new n.Vector3(1,1,1),new n.Vector3(1,1,1),new n.Vector3(1,1,1),new n.Vector3(1,1,1),new n.Vector3(1,1,1)],i.compositeMaterial.uniforms.bloomTintColors.value=i.bloomTintColors,Y.CopyShader===void 0&&console.error("THREE.UnrealBloomPass relies on CopyShader");var se=Y.CopyShader;return i.copyUniforms=n.UniformsUtils.clone(se.uniforms),i.copyUniforms.opacity.value=1,i.materialCopy=new n.ShaderMaterial({uniforms:i.copyUniforms,vertexShader:se.vertexShader,fragmentShader:se.fragmentShader,blending:n.AdditiveBlending,depthTest:!1,depthWrite:!1,transparent:!0}),i.enabled=!0,i.needsSwap=!1,i._oldClearColor=new n.Color,i.oldClearAlpha=1,i.basic=new n.MeshBasicMaterial,i.fsQuad=new xe.FullScreenQuad(void 0),i}var e=a.prototype;return e.dispose=function(){for(var r=0;r<this.renderTargetsHorizontal.length;r++)this.renderTargetsHorizontal[r].dispose();for(var l=0;l<this.renderTargetsVertical.length;l++)this.renderTargetsVertical[l].dispose();this.renderTargetBright.dispose()},e.setSize=function(r,l){var d=Math.round(r/2),i=Math.round(l/2);this.renderTargetBright.setSize(d,i);for(var b=0;b<this.nMips;b++)this.renderTargetsHorizontal[b].setSize(d,i),this.renderTargetsVertical[b].setSize(d,i),this.separableBlurMaterials[b].uniforms.texSize.value=new n.Vector2(d,i),d=Math.round(d/2),i=Math.round(i/2)},e.render=function(r,l,d,i,b){r.getClearColor(this._oldClearColor),this.oldClearAlpha=r.getClearAlpha();var Z=r.autoClear;r.autoClear=!1,r.setClearColor(this.clearColor,0),b&&r.state.buffers.stencil.setTest(!1),this.renderToScreen&&(this.fsQuad.material=this.basic,this.basic.map=d.texture,r.setRenderTarget(null),r.clear(),this.fsQuad.render(r)),this.highPassUniforms.tDiffuse.value=d.texture,this.highPassUniforms.luminosityThreshold.value=this.threshold,this.fsQuad.material=this.materialHighPassFilter,r.setRenderTarget(this.renderTargetBright),r.clear(),this.fsQuad.render(r);for(var j=this.renderTargetBright,E=0;E<this.nMips;E++)this.fsQuad.material=this.separableBlurMaterials[E],this.separableBlurMaterials[E].uniforms.colorTexture.value=j.texture,this.separableBlurMaterials[E].uniforms.direction.value=a.BlurDirectionX,r.setRenderTarget(this.renderTargetsHorizontal[E]),r.clear(),this.fsQuad.render(r),this.separableBlurMaterials[E].uniforms.colorTexture.value=this.renderTargetsHorizontal[E].texture,this.separableBlurMaterials[E].uniforms.direction.value=a.BlurDirectionY,r.setRenderTarget(this.renderTargetsVertical[E]),r.clear(),this.fsQuad.render(r),j=this.renderTargetsVertical[E];this.fsQuad.material=this.compositeMaterial,this.compositeMaterial.uniforms.bloomStrength.value=this.strength,this.compositeMaterial.uniforms.bloomRadius.value=this.radius,this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,r.setRenderTarget(this.renderTargetsHorizontal[0]),r.clear(),this.fsQuad.render(r),this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.renderTargetsHorizontal[0].texture,b&&r.state.buffers.stencil.setTest(!0),this.renderToScreen?(r.setRenderTarget(null),this.fsQuad.render(r)):(r.setRenderTarget(d),this.fsQuad.render(r)),r.setClearColor(this._oldClearColor,this.oldClearAlpha),r.autoClear=Z},e.getSeperableBlurMaterial=function(r){return new n.ShaderMaterial({defines:{KERNEL_RADIUS:r,SIGMA:r},uniforms:{colorTexture:{value:null},texSize:{value:new n.Vector2(.5,.5)},direction:{value:new n.Vector2(.5,.5)}},vertexShader:`varying vec2 vUv;
19
2
  void main() {
20
3
  vUv = uv;
21
4
  gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
@@ -29,7 +12,7 @@ void main() {
29
12
  }
30
13
  void main() {
31
14
  vec2 invSize = 1.0 / texSize; float fSigma = float(SIGMA); float weightSum = gaussianPdf(0.0, fSigma); float alphaSum = 0.0; vec3 diffuseSum = texture2D( colorTexture, vUv).rgb * weightSum; for( int i = 1; i < KERNEL_RADIUS; i ++ ) { float x = float(i); float w = gaussianPdf(x, fSigma); vec2 uvOffset = direction * invSize * x; vec4 sample1 = texture2D( colorTexture, vUv + uvOffset); vec4 sample2 = texture2D( colorTexture, vUv - uvOffset); diffuseSum += (sample1.rgb + sample2.rgb) * w; alphaSum += (sample1.a + sample2.a) * w; weightSum += 2.0 * w; } gl_FragColor = vec4(diffuseSum/weightSum, alphaSum/weightSum);
32
- }`})},e.getCompositeMaterial=function(r){return new d.ShaderMaterial({defines:{NUM_MIPS:r},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},dirtTexture:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:`varying vec2 vUv;
15
+ }`})},e.getCompositeMaterial=function(r){return new n.ShaderMaterial({defines:{NUM_MIPS:r},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},dirtTexture:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:`varying vec2 vUv;
33
16
  void main() {
34
17
  vUv = uv;
35
18
  gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
@@ -54,4 +37,4 @@ void main() {
54
37
  lerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +
55
38
  lerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +
56
39
  lerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) );
57
- }`})},n}(je.Pass);we.BlurDirectionX=new d.Vector2(1,0),we.BlurDirectionY=new d.Vector2(0,1);var $e={threshold:.2,strength:.5,radius:0},Je=new d.MeshBasicMaterial({color:"black"}),et=new d.SpriteMaterial({color:"#000"}),tt=function(){"use strict";function s(n,e){R(this,s),this.materials={},this.bloomLayer=new d.Layers,this.active=!0,this.composerController=n,this.options=e;var t=n.renderer,r=n.renderPass,o=n.finalComposer,u=n.getSize(),a=u.width,h=u.height,w=new we(new d.Vector2(a,h),e.strength,e.radius,e.threshold);this.bloomPass=w;var P=new ee.EffectComposer(t);P.renderToScreen=!1,P.addPass(r),P.addPass(this.bloomPass),this.bloomComposer=P,this.bloomLayer.set(Ne);var y=new d.ShaderMaterial({uniforms:{baseTexture:{value:null},bloomTexture:{value:P.renderTarget2.texture}},vertexShader:We,fragmentShader:He,defines:{}}),_=new le.ShaderPass(y,"baseTexture");_.needsSwap=!0,this.finalPass=_,o.addPass(_)}var i=s.prototype;return i.enable=function(){this.active||(this.finalPass.enabled=!0,this.bloomPass.enabled=!0,this.active=!0)},i.disable=function(){!this.active||(this.finalPass.enabled=!1,this.bloomPass.enabled=!1,this.active=!1)},i.render=function(e){if(!!this.active){var t=this,r=t.bloomComposer,o=t.bloomLayer,u=t.materials;e.traverse(function(a){var h=a;h.material&&o.test(h.layers)===!1&&(u[h.uuid]=h.material,h.material=h.isSprite?et:Je)}),r.render(),e.traverse(function(a){var h=a;u[h.uuid]&&(h.material=u[h.uuid],delete u[h.uuid])})}},i.setSize=function(e,t){this.bloomComposer.setSize(e,t)},i.setGui=function(e){var t=this,r=new c({bloom:{threshold:{value:this.options.threshold,min:0,max:1,target:function(){return t.bloomPass}},strength:{value:this.options.strength,min:0,max:10,target:function(){return t.bloomPass}},radius:{value:this.options.radius,min:0,max:2,step:.01,target:function(){return t.bloomPass}}}});r.showGui(e)},i.dispose=function(){this.bloomPass.dispose(),this.materials={}},s}(),rt=require("three/examples/jsm/postprocessing/OutlinePass"),nt={edgeStrength:3,edgeGlow:4,edgeThickness:1,pulsePeriod:0,rotate:!1,usePatternTexture:!1,visibleEdgeColor:"#5ee8e8",hiddenEdgeColor:"#190a05"},it=function(){"use strict";function s(n,e){R(this,s),this.selectedObjects=[],this.active=!0,this.composerController=n,this.options=e;var t=n.scene,r=n.camera,o=n.finalComposer,u=n.getSize(),a=u.width,h=u.height,w=new rt.OutlinePass(new d.Vector2(a,h),t,r);w.selectedObjects=this.selectedObjects,this.outlinePass=w,o.addPass(w),this.setGui()}var i=s.prototype;return i.enable=function(){this.active||(this.outlinePass.enabled=!0,this.active=!0)},i.disable=function(){!this.active||(this.outlinePass.enabled=!1,this.active=!1)},i.setGui=function(){var e=this,t=new c({outline:{edgeStrength:{value:this.options.edgeStrength,min:.01,max:10,step:.01,target:function(){return e.outlinePass}},edgeGlow:{value:this.options.edgeGlow,min:0,max:10,step:.01,target:function(){return e.outlinePass}},edgeThickness:{value:this.options.edgeThickness,min:0,max:4,step:.01,target:function(){return e.outlinePass}},pulsePeriod:{value:this.options.pulsePeriod,min:0,max:4,step:.01,target:function(){return e.outlinePass}},usePatternTexture:{value:this.options.usePatternTexture,target:function(){return e.outlinePass}},visibleEdgeColor:{value:this.options.visibleEdgeColor,target:function(){return e.outlinePass}},hiddenEdgeColor:{value:this.options.hiddenEdgeColor,target:function(){return e.outlinePass}}}});t.setTargetValueByParams(),this.outlineGui=t},i.dispose=function(){this.outlinePass.dispose(),this.selectedObjects=[]},s}();function at(s,i){if(s==null)return{};var n={},e=Object.keys(s),t,r;for(r=0;r<e.length;r++)t=e[r],!(i.indexOf(t)>=0)&&(n[t]=s[t]);return n}function st(s,i){if(s==null)return{};var n=at(s,i),e,t;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(s);for(t=0;t<r.length;t++)e=r[t],!(i.indexOf(e)>=0)&&(!Object.prototype.propertyIsEnumerable.call(s,e)||(n[e]=s[e]))}return n}var ot=require("three/examples/jsm/postprocessing/SSRPass"),ut=require("three/examples/jsm/objects/ReflectorForSSRPass"),lt={maxDistance:10,selects:!0},ct={width:1,height:1,clipBias:3e-4,color:8947848,useDepthTexture:!0},ft=function(){"use strict";function s(n,e){R(this,s),this.selectedObjects=[],this.active=!0,this.composerController=n,this.options=e;var t=n.scene,r=n.camera,o=n.renderer,u=n.finalComposer,a=n.getSize(),h=a.width,w=a.height,P=new ot.SSRPass({renderer:o,scene:t,camera:r,width:h,height:w,groundReflector:null,selects:this.selectedObjects});this.ssrPass=P,u.addPass(P),this.setGui()}var i=s.prototype;return i.addGroundReflector=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=(0,G.Z)({},ct,e),r=t.width,o=t.height,u=st(t,["width","height"]),a=this.composerController,h=a.scene,w=a.getSize(),P=new d.PlaneGeometry(r,o),y=new ut.ReflectorForSSRPass(P,E((0,G.Z)({},u),{textureWidth:w.width,textureHeight:w.height}));y.material.depthWrite=!1,y.rotation.x=-Math.PI/2,y.visible=!1,h.add(y),this.ssrPass.groundReflector=this.groundReflector,this.groundReflector=y},i.removeaGroundReflector=function(){this.ssrPass.groundReflector=null,this.groundReflector=void 0},i.enable=function(){this.active||(this.ssrPass.enabled=!0,this.active=!0)},i.disable=function(){!this.active||(this.ssrPass.enabled=!1,this.active=!1)},i.setSize=function(e,t){var r=this.groundReflector;r&&(r.getRenderTarget().setSize(e,t),r.resolution.set(e,t))},i.setGui=function(){var e=this,t=new c({ssr:{thickness:{value:.018,min:0,max:.1,step:1e-4,target:function(){return e.ssrPass}},infiniteThick:{value:!1,target:function(){return e.ssrPass}},fresnel:{value:!0,target:function(){return[e.ssrPass,e.groundReflector]}},distanceAttenuation:{value:!0,target:function(){return[e.ssrPass,e.groundReflector]}},selects:{value:this.options.selects,onChange:function(r){r?e.ssrPass.selects=e.selectedObjects:e.ssrPass.selects=null}},maxDistance:{value:this.options.maxDistance,min:0,max:100,step:.001,target:function(){return[e.ssrPass,e.groundReflector]}},opacity:{value:1,min:0,max:1,step:.01,target:function(){return[e.ssrPass,e.groundReflector]}}}});t.setTargetValueByParams(),this.ssrGui=t},i.dispose=function(){this.ssrPass.dispose(),this.selectedObjects=[]},s}(),dt=function(){"use strict";function s(n){R(this,s),this.active=!0,this.options=n;var e=n.renderer,t=n.scene,r=n.camera,o=this.createRenderTarget(),u=new ee.EffectComposer(e,o);u.setPixelRatio(e.getPixelRatio()),this.finalComposer=u,this.addRenderPasss(),this.renderer=e,this.scene=t,this.renderTarget=o,this.camera=r}var i=s.prototype;return i.createRenderTarget=function(){var e=this.options.composerParams,t=e.multisampling,r=e.type,o=e.encoding,u=this.getSize(),a={minFilter:d.LinearFilter,magFilter:d.LinearFilter,format:d.RGBAFormat,encoding:o,type:r},h;if(+d.REVISION<138&&t>0){var w=new d.WebGLMultisampleRenderTarget(u.width,u.height,a);w.samples=t,h=w}else if(+d.REVISION>=138&&t>0){var P=new d.WebGLRenderTarget(u.width,u.height,E((0,G.Z)({},a),{samples:t}));h=P}else{var y=new d.WebGLRenderTarget(u.width,u.height,a);h=y}return h.texture.name="EffectComposer.rt1",h},i.addRenderPasss=function(){var e=this.options,t=e.scene,r=e.camera,o=new ve.RenderPass(t,r);this.finalComposer.addPass(o),this.renderPass=o},i.addCopyPass=function(){var e=new le.ShaderPass(ue.CopyShader);this.finalComposer.addPass(e),this.copyPass=e},i.addGammaCorrectionPass=function(){var e=new le.ShaderPass(Fe.GammaCorrectionShader);this.finalComposer.addPass(e),this.gammaCorrectionPass=e},i.addFXAAPass=function(){var e=this.getSize(),t=e.width,r=e.height,o=new le.ShaderPass(Ve.FXAAShader);this.finalComposer.addPass(o),this.fxaaPass=o,this.setFXAAPassSize(t,r)},i.addSMAAPass=function(){var e=this.getSize(),t=e.width,r=e.height,o=this.options.renderer,u=new Ue.SMAAPass(t*o.getPixelRatio(),r*o.getPixelRatio());this.finalComposer.addPass(u),this.smaaPass=u},i.addSSAAPass=function(){var e=this.options,t=e.scene,r=e.camera,o=new ke.SSAARenderPass(t,r,0,0);o.unbiased=!0,o.sampleLevel=1,this.finalComposer.addPass(o),this.ssaaPass=o},i.addBloomPass=function(e){var t=new tt(this,e);t.disable(),this.options.gui&&t.setGui(this.options.gui),this.bloomController=t},i.addOutlinePass=function(e){var t=new it(this,e);t.disable(),this.options.gui&&t.outlineGui.showGui(this.options.gui),this.outlineController=t},i.addSSRPass=function(e){var t=new ft(this,e);t.disable(),this.options.gui&&t.ssrGui.showGui(this.options.gui),this.ssrController=t},i.getSize=function(){var e=this.options.renderer;return e.getSize(new d.Vector2)},i.enable=function(){this.active||(this.active=!0)},i.disable=function(){!this.active||(this.active=!1)},i.checkCopyPass=function(){var e=this,t=this.finalComposer.passes.some(function(r){return r!==e.renderPass&&r!==e.copyPass?r.enabled:!1});t&&this.copyPass?this.copyPass.enabled=!1:!t&&this.copyPass?this.copyPass.enabled=!0:!t&&!this.copyPass&&this.addCopyPass()},i.setSize=function(e,t){var r,o;this.finalComposer.setSize(e,t),(r=this.bloomController)===null||r===void 0||r.setSize(e,t),(o=this.ssrController)===null||o===void 0||o.setSize(e,t),this.setFXAAPassSize(e,t)},i.setFXAAPassSize=function(e,t){if(!!this.fxaaPass){var r=this.options.renderer,o=r.getPixelRatio();this.fxaaPass.material.uniforms.resolution.value.x=1/(e*o),this.fxaaPass.material.uniforms.resolution.value.y=1/(t*o)}},i.render=function(){var e;if(!!this.active){var t=this.options.scene;(e=this.bloomController)===null||e===void 0||e.render(t),this.finalComposer.render()}},i.dispose=function(){var e,t,r;(e=this.bloomController)===null||e===void 0||e.dispose(),(t=this.outlineController)===null||t===void 0||t.dispose(),(r=this.ssrController)===null||r===void 0||r.dispose(),this.finalComposer.passes.forEach(function(o){var u,a,h;(u=o.fsQuad)===null||u===void 0||u.dispose(),(a=o.fsQuad)===null||a===void 0||(h=a.material)===null||h===void 0||h.dispose()}),this.renderTarget.dispose(),this.copyPass=void 0,this.gammaCorrectionPass=void 0,this.smaaPass=void 0,this.ssaaPass=void 0,this.fxaaPass=void 0,this.bloomController=void 0,this.outlineController=void 0,this.ssrController=void 0},s}(),Ce=function(){"use strict";function s(n){R(this,s),this.raycaster=new d.Raycaster,this.installPlugins=new Map,this.event=new se.EventEmitter,this.clock=new d.Clock,this.options=V()(s.options,n,{isMergeableObject:F.isPlainObject});var e=this.options,t=e.container,r=e.stats,o=e.gui;if(o){var u=new(f());u.open(!1),this.gui=u}if(r){var a=new(D());a.showPanel(0),a.dom.style.position="absolute",t.appendChild(a.dom),this.stats=a}this.init(),this.initComposer(),this.initCSSRenderer(),this.initControl(),this.clock.getDelta(),this.clock.getElapsedTime()}var i=s.prototype;return i.use=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];if(this.installPlugins.has(e))console.log("plugin already installed");else if(typeof e.install=="function"){var u;(u=e).install.apply(u,[this].concat(X(r))),this.installPlugins.set(e,!0)}},i.init=function(){var e=this,t=this.options,r=t.container,o=t.isdev,u=t.axesHelper,a=t.renderer,h=t.scene,w=t.camera,P=this.getSize(),y=P.width,_=P.height,M=new j({isdev:o,width:y,height:_,cameraParams:w});this.gui&&M.setGui(this.gui);var L=M.camera,Z=new de({camera:L,sceneParams:h}),I=Z.scene,ae=new S({width:y,height:_,scene:I,camera:L,isdev:o,rendererParams:E((0,G.Z)({},a),{outputEncoding:d.LinearEncoding,antialias:!1})});this.gui&&ae.setGui(this.gui);var k=ae.renderer;u&&Z.addAxesHelper(),this.sceneController=Z,this.rendererController=ae,this.cameraController=M,r.appendChild(k.domElement);var ne=new ResizeObserver(function(ce){var fe=!0,ye=!1,De=void 0;try{for(var xe=ce[Symbol.iterator](),ze;!(fe=(ze=xe.next()).done);fe=!0){var bt=ze.value,Ge=bt.contentRect;e.handeleResize(Ge.width,Ge.height)}}catch(yt){ye=!0,De=yt}finally{try{!fe&&xe.return!=null&&xe.return()}finally{if(ye)throw De}}});ne.observe(r),this.resizeObserver=ne},i.initComposer=function(){var e=this.options,t=e.bloom,r=e.outline,o=e.ssr,u=e.renderer,a=e.bloomParams,h=e.outlineParams,w=e.ssrParams,P=e.multisampling,y=u.antialias;y==="msaa"&&!Re&&(y=!1,console.warn("MSAA is not supported on this browser"));var _=new dt({renderer:this.renderer,scene:this.scene,camera:this.camera,gui:this.gui,composerParams:{multisampling:y==="msaa"?P:0,type:d.UnsignedByteType,encoding:u.outputEncoding}});this.composerController=_,y==="ssaa"&&_.addSSAAPass(),o&&_.addSSRPass(w),t&&_.addBloomPass(a),r&&_.addOutlinePass(h),u.outputEncoding===d.sRGBEncoding&&_.addGammaCorrectionPass(),y==="fxaa"?_.addFXAAPass():y==="smaa"&&_.addSMAAPass(),_.checkCopyPass(),this.event.on("passcheck",function(){_.checkCopyPass()})},i.initCSSRenderer=function(){var e=this.options,t=e.container,r=e.css2DRenderer,o=e.css3DRenderer,u=e.css2DRendererParams,a=e.css3DRendererParams;if(r||o){var h=new re(t);r&&h.addRenderer("css2d",u),o&&h.addRenderer("css3d",a),this.cssRendererController=h}},i.initControl=function(){var e=this.options,t=e.control,r=e.mapControl,o=e.controlParams;if(t){var u=new ge({camera:this.camera,controlParams:{domElement:(o==null?void 0:o.domElement)||this.renderer.domElement},mapControl:r});this.controlController=u}},i.getSize=function(){var e=this.options.container;return{width:e.offsetWidth,height:e.offsetHeight}},i.handeleResize=function(e,t){var r=this,o=r.rendererController,u=r.cameraController,a=r.composerController,h=r.cssRendererController;u==null||u.setSize(e,t),o==null||o.setSize(e,t),a==null||a.setSize(e,t),h==null||h.setSize(e,t),this.installPlugins.forEach(function(w,P){var y;(y=P.resize)===null||y===void 0||y.call(P,{width:e,height:t})}),this.event.emit("resize",{width:e,height:t})},i.pick=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,o=this,u=o.raycaster,a=o.options,h=a.container,w=new d.Vector2,P=h.getBoundingClientRect();if(w.x=(e.clientX-P.left)/(P.right-P.left)*2-1,w.y=-((e.clientY-P.top)/(P.bottom-P.top))*2+1,this.camera&&this.scene){u.setFromCamera(w,this.camera);var y=u.intersectObjects(t||this.scene.children,r);if(y.length)return{object:y[0].object,intersects:y}}},i.render=function(){var e,t,r,o,u=this,a=u.renderer,h=u.scene,w=u.camera,P=u.clock;if(!(!a||!h||!w||this.options.staticRender&&!this.cameraController.checkCameraChange())){var y=P.getDelta(),_=P.getElapsedTime();if(a.clear(),Y().update(),(e=this.controlController)===null||e===void 0||e.update(),this.installPlugins.forEach(function(L,Z){var I;(I=Z.update)===null||I===void 0||I.call(Z,y,_)}),!((t=this.composerController)===null||t===void 0)&&t.active)this.composerController.render();else{var M;(M=this.rendererController)===null||M===void 0||M.render()}(r=this.cssRendererController)===null||r===void 0||r.render(h,w),(o=this.stats)===null||o===void 0||o.update(),this.event.emit("render",{delta:y,elapsed:_})}},i.start=function(){this.renderer.setAnimationLoop(this.render.bind(this)),this.event.emit("start")},i.stop=function(){this.renderer.setAnimationLoop(null),this.event.emit("stop")},i.dispose=function(){var e,t,r,o,u,a,h;this.stop(),Y().removeAll(),this.handeleResize(0,0),(e=this.resizeObserver)===null||e===void 0||e.unobserve(this.options.container),this.installPlugins.forEach(function(w,P){var y;(y=P.dispose)===null||y===void 0||y.call(P)}),(t=this.controlController)===null||t===void 0||t.dispose(),(r=this.cssRendererController)===null||r===void 0||r.dispose(),(o=this.sceneController)===null||o===void 0||o.dispose(),(u=this.composerController)===null||u===void 0||u.dispose(),(a=this.rendererController)===null||a===void 0||a.dispose(),this.controlController=void 0,this.cssRendererController=void 0,(h=this.gui)===null||h===void 0||h.destroy(),this.event.removeAllListeners(),this.installPlugins.clear()},x(s,[{key:"renderer",get:function(){return this.rendererController.renderer}},{key:"control",get:function(){var e;return(e=this.controlController)===null||e===void 0?void 0:e.control}},{key:"camera",get:function(){return this.cameraController.camera}},{key:"scene",get:function(){return this.sceneController.scene}}]),s}();Ce.options={isdev:pe,stats:pe,gui:pe,axesHelper:pe,control:pe,renderer:E((0,G.Z)({},b),{antialias:Re?"msaa":"smaa"}),staticRender:!1,multisampling:8,scene:oe,camera:A,bloom:!1,bloomParams:$e,outline:!1,outlineParams:nt,css2DRenderer:!1,ssr:!1,ssrParams:lt,css2DRendererParams:(0,G.Z)({},J),css3DRenderer:!1,css3DRendererParams:(0,G.Z)({},J)};function ht(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(s){return!1}}function be(s,i,n){return ht()?be=Reflect.construct:be=function(t,r,o){var u=[null];u.push.apply(u,r);var a=Function.bind.apply(t,u),h=new a;return o&&Me(h,o.prototype),h},be.apply(null,arguments)}function Le(s,i,n){return be.apply(null,arguments)}var vt=K(484);function pt(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n={};return n.promise=new Promise(function(e,t){n.resolve=e,n.reject=t}),s&&(n.promise=(0,vt.Z)(n.promise,i)),n}var mt=require("three/examples/jsm/renderers/CSS2DRenderer"),Ae=function(s){s&&((0,F.disposeMesh)(s),s.children.forEach(function(i){i.userData.BaseObject_||Ae(i)}))},gt=function(){"use strict";function s(){R(this,s),this.objecttype__="BaseObject",this.userData={},this.pm=pt(),this.visible=!1}var i=s.prototype;return i.init=function(){},i.create=function(){},i.render=function(){},i.update=function(e,t){},i.resize=function(e,t){},i.show=function(){return this.object3d&&(this.object3d.visible=!0),this.visible=!0,this},i.hide=function(){return this.object3d&&(this.object3d.visible=!1),this.visible=!1,this},i.isVisible=function(){return this.visible},i.createMesh=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.object3d=Le(d.Mesh,X(t)),this},i.createGroup=function(){return this.object3d=new d.Group,this},i.createPoints=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.object3d=Le(d.Points,X(t)),this},i.createCSS2DObject=function(e){return this.object3d=new mt.CSS2DObject(e),this},i.createCSS3DObject=function(e){return this.object3d=new v.CSS3DObject(e),this},i.createCSS3DSprite=function(e){return this.object3d=new v.CSS3DSprite(e),this},i.createSprite=function(e){return this.object3d=new d.Sprite(e),this},i.add=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o;return(o=this.object3d).add.apply(o,X(t)),this},i.remove=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o;return(o=this.object3d).remove.apply(o,X(t)),this},i.getSize=function(){var e=new d.Box3().setFromObject(this.object3d);return{min:e.min,max:e.max,size:e.getSize(new d.Vector3)}},i.traverse=function(e){e(this),this.children.forEach(function(t){t.traverse(e)})},i.dispose=function(){Ae(this.object3d)},x(s,[{key:"parent",get:function(){var e=this.object3d.parent;return(e==null?void 0:e.userData.BaseObject_)||this.pencil.scene}},{key:"children",get:function(){return this.object3d.children.map(function(e){return e.userData.BaseObject_}).filter(function(e){return!!e})}}]),s}()})(),module.exports=Pe})();
40
+ }`})},a}(xe.Pass);Pe.BlurDirectionX=new n.Vector2(1,0),Pe.BlurDirectionY=new n.Vector2(0,1);var ze={threshold:.2,strength:.5,radius:0},Ze=new n.MeshBasicMaterial({color:"black"}),Be=new n.SpriteMaterial({color:"#000"}),Ge=function(){"use strict";function z(a,e){(0,x.Z)(this,z),this.materials={},this.bloomLayer=new n.Layers,this.active=!0,this.composerController=a,this.options=e;var t=a.renderer,r=a.renderPass,l=a.finalComposer,d=a.getSize(),i=d.width,b=d.height,Z=new Pe(new n.Vector2(i,b),e.strength,e.radius,e.threshold);this.bloomPass=Z;var j=new w.EffectComposer(t);j.renderToScreen=!1,j.addPass(r),j.addPass(this.bloomPass),this.bloomComposer=j,this.bloomLayer.set(le);var E=new n.ShaderMaterial({uniforms:{baseTexture:{value:null},bloomTexture:{value:j.renderTarget2.texture}},vertexShader:je,fragmentShader:Le,defines:{}}),A=new L.ShaderPass(E,"baseTexture");A.needsSwap=!0,this.finalPass=A,l.addPass(A)}var g=z.prototype;return g.enable=function(){this.active||(this.finalPass.enabled=!0,this.bloomPass.enabled=!0,this.active=!0)},g.disable=function(){!this.active||(this.finalPass.enabled=!1,this.bloomPass.enabled=!1,this.active=!1)},g.render=function(e){if(!!this.active){var t=this,r=t.bloomComposer,l=t.bloomLayer,d=t.materials;e.traverse(function(i){var b=i;b.material&&l.test(b.layers)===!1&&(d[b.uuid]=b.material,b.material=b.isSprite?Be:Ze)}),r.render(),e.traverse(function(i){var b=i;d[b.uuid]&&(b.material=d[b.uuid],delete d[b.uuid])})}},g.setSize=function(e,t){this.bloomComposer.setSize(e,t)},g.setGui=function(e){var t=this,r=new Q.Z({bloom:{threshold:{value:this.options.threshold,min:0,max:1,target:function(){return t.bloomPass}},strength:{value:this.options.strength,min:0,max:10,target:function(){return t.bloomPass}},radius:{value:this.options.radius,min:0,max:2,step:.01,target:function(){return t.bloomPass}}}});r.showGui(e)},g.dispose=function(){this.bloomPass.dispose(),this.materials={}},z}(),ke=require("three/examples/jsm/postprocessing/OutlinePass"),Ue={edgeStrength:3,edgeGlow:4,edgeThickness:1,pulsePeriod:0,rotate:!1,usePatternTexture:!1,visibleEdgeColor:"#5ee8e8",hiddenEdgeColor:"#190a05"},Fe=function(){"use strict";function z(a,e){(0,x.Z)(this,z),this.selectedObjects=[],this.active=!0,this.composerController=a,this.options=e;var t=a.scene,r=a.camera,l=a.finalComposer,d=a.getSize(),i=d.width,b=d.height,Z=new ke.OutlinePass(new n.Vector2(i,b),t,r);Z.selectedObjects=this.selectedObjects,this.outlinePass=Z,l.addPass(Z),this.setGui()}var g=z.prototype;return g.enable=function(){this.active||(this.outlinePass.enabled=!0,this.active=!0)},g.disable=function(){!this.active||(this.outlinePass.enabled=!1,this.active=!1)},g.setGui=function(){var e=this,t=new Q.Z({outline:{edgeStrength:{value:this.options.edgeStrength,min:.01,max:10,step:.01,target:function(){return e.outlinePass}},edgeGlow:{value:this.options.edgeGlow,min:0,max:10,step:.01,target:function(){return e.outlinePass}},edgeThickness:{value:this.options.edgeThickness,min:0,max:4,step:.01,target:function(){return e.outlinePass}},pulsePeriod:{value:this.options.pulsePeriod,min:0,max:4,step:.01,target:function(){return e.outlinePass}},usePatternTexture:{value:this.options.usePatternTexture,target:function(){return e.outlinePass}},visibleEdgeColor:{value:this.options.visibleEdgeColor,target:function(){return e.outlinePass}},hiddenEdgeColor:{value:this.options.hiddenEdgeColor,target:function(){return e.outlinePass}}}});t.setTargetValueByParams(),this.outlineGui=t},g.dispose=function(){this.outlinePass.dispose(),this.selectedObjects=[]},z}(),Ie=H(607),Ve=require("three/examples/jsm/postprocessing/SSRPass"),Ne=require("three/examples/jsm/objects/ReflectorForSSRPass"),We={maxDistance:10,selects:!0},He={width:1,height:1,clipBias:3e-4,color:8947848,useDepthTexture:!0},Xe=function(){"use strict";function z(a,e){(0,x.Z)(this,z),this.selectedObjects=[],this.active=!0,this.composerController=a,this.options=e;var t=a.scene,r=a.camera,l=a.renderer,d=a.finalComposer,i=a.getSize(),b=i.width,Z=i.height,j=new Ve.SSRPass({renderer:l,scene:t,camera:r,width:b,height:Z,groundReflector:null,selects:this.selectedObjects});this.ssrPass=j,d.addPass(j),this.setGui()}var g=z.prototype;return g.addGroundReflector=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=(0,c.Z)({},He,e),r=t.width,l=t.height,d=(0,Ie.Z)(t,["width","height"]),i=this.composerController,b=i.scene,Z=i.getSize(),j=new n.PlaneGeometry(r,l),E=new Ne.ReflectorForSSRPass(j,(0,y.Z)((0,c.Z)({},d),{textureWidth:Z.width,textureHeight:Z.height}));E.material.depthWrite=!1,E.rotation.x=-Math.PI/2,E.visible=!1,b.add(E),this.ssrPass.groundReflector=this.groundReflector,this.groundReflector=E},g.removeaGroundReflector=function(){this.ssrPass.groundReflector=null,this.groundReflector=void 0},g.enable=function(){this.active||(this.ssrPass.enabled=!0,this.active=!0)},g.disable=function(){!this.active||(this.ssrPass.enabled=!1,this.active=!1)},g.setSize=function(e,t){var r=this.groundReflector;r&&(r.getRenderTarget().setSize(e,t),r.resolution.set(e,t))},g.setGui=function(){var e=this,t=new Q.Z({ssr:{thickness:{value:.018,min:0,max:.1,step:1e-4,target:function(){return e.ssrPass}},infiniteThick:{value:!1,target:function(){return e.ssrPass}},fresnel:{value:!0,target:function(){return[e.ssrPass,e.groundReflector]}},distanceAttenuation:{value:!0,target:function(){return[e.ssrPass,e.groundReflector]}},selects:{value:this.options.selects,onChange:function(r){r?e.ssrPass.selects=e.selectedObjects:e.ssrPass.selects=null}},maxDistance:{value:this.options.maxDistance,min:0,max:100,step:.001,target:function(){return[e.ssrPass,e.groundReflector]}},opacity:{value:1,min:0,max:1,step:.01,target:function(){return[e.ssrPass,e.groundReflector]}}}});t.setTargetValueByParams(),this.ssrGui=t},g.dispose=function(){this.ssrPass.dispose(),this.selectedObjects=[]},z}(),Ke=function(){"use strict";function z(a){(0,x.Z)(this,z),this.active=!0,this.options=a;var e=a.renderer,t=a.scene,r=a.camera,l=this.createRenderTarget(),d=new w.EffectComposer(e,l);d.setPixelRatio(e.getPixelRatio()),this.finalComposer=d,this.addRenderPasss(),this.renderer=e,this.scene=t,this.renderTarget=l,this.camera=r}var g=z.prototype;return g.createRenderTarget=function(){var e=this.options.composerParams,t=e.multisampling,r=e.type,l=e.encoding,d=this.getSize(),i={minFilter:n.LinearFilter,magFilter:n.LinearFilter,format:n.RGBAFormat,encoding:l,type:r},b;if(+n.REVISION<138&&t>0){var Z=new n.WebGLMultisampleRenderTarget(d.width,d.height,i);Z.samples=t,b=Z}else if(+n.REVISION>=138&&t>0){var j=new n.WebGLRenderTarget(d.width,d.height,(0,y.Z)((0,c.Z)({},i),{samples:t}));b=j}else{var E=new n.WebGLRenderTarget(d.width,d.height,i);b=E}return b.texture.name="EffectComposer.rt1",b},g.addRenderPasss=function(){var e=this.options,t=e.scene,r=e.camera,l=new B.RenderPass(t,r);this.finalComposer.addPass(l),this.renderPass=l},g.addCopyPass=function(){var e=new L.ShaderPass(Y.CopyShader);this.finalComposer.addPass(e),this.copyPass=e},g.addGammaCorrectionPass=function(){var e=new L.ShaderPass(ee.GammaCorrectionShader);this.finalComposer.addPass(e),this.gammaCorrectionPass=e},g.addFXAAPass=function(){var e=this.getSize(),t=e.width,r=e.height,l=new L.ShaderPass(re.FXAAShader);this.finalComposer.addPass(l),this.fxaaPass=l,this.setFXAAPassSize(t,r)},g.addSMAAPass=function(){var e=this.getSize(),t=e.width,r=e.height,l=this.options.renderer,d=new te.SMAAPass(t*l.getPixelRatio(),r*l.getPixelRatio());this.finalComposer.addPass(d),this.smaaPass=d},g.addSSAAPass=function(){var e=this.options,t=e.scene,r=e.camera,l=new ne.SSAARenderPass(t,r,0,0);l.unbiased=!0,l.sampleLevel=1,this.finalComposer.addPass(l),this.ssaaPass=l},g.addBloomPass=function(e){var t=new Ge(this,e);t.disable(),this.options.gui&&t.setGui(this.options.gui),this.bloomController=t},g.addOutlinePass=function(e){var t=new Fe(this,e);t.disable(),this.options.gui&&t.outlineGui.showGui(this.options.gui),this.outlineController=t},g.addSSRPass=function(e){var t=new Xe(this,e);t.disable(),this.options.gui&&t.ssrGui.showGui(this.options.gui),this.ssrController=t},g.getSize=function(){var e=this.options.renderer;return e.getSize(new n.Vector2)},g.enable=function(){this.active||(this.active=!0)},g.disable=function(){!this.active||(this.active=!1)},g.checkCopyPass=function(){var e=this,t=this.finalComposer.passes.some(function(r){return r!==e.renderPass&&r!==e.copyPass?r.enabled:!1});t&&this.copyPass?this.copyPass.enabled=!1:!t&&this.copyPass?this.copyPass.enabled=!0:!t&&!this.copyPass&&this.addCopyPass()},g.setSize=function(e,t){var r,l;this.finalComposer.setSize(e,t),(r=this.bloomController)===null||r===void 0||r.setSize(e,t),(l=this.ssrController)===null||l===void 0||l.setSize(e,t),this.setFXAAPassSize(e,t)},g.setFXAAPassSize=function(e,t){if(!!this.fxaaPass){var r=this.options.renderer,l=r.getPixelRatio();this.fxaaPass.material.uniforms.resolution.value.x=1/(e*l),this.fxaaPass.material.uniforms.resolution.value.y=1/(t*l)}},g.render=function(){var e;if(!!this.active){var t=this.options.scene;(e=this.bloomController)===null||e===void 0||e.render(t),this.finalComposer.render()}},g.dispose=function(){var e,t,r;(e=this.bloomController)===null||e===void 0||e.dispose(),(t=this.outlineController)===null||t===void 0||t.dispose(),(r=this.ssrController)===null||r===void 0||r.dispose(),this.finalComposer.passes.forEach(function(l){var d,i,b;(d=l.fsQuad)===null||d===void 0||d.dispose(),(i=l.fsQuad)===null||i===void 0||(b=i.material)===null||b===void 0||b.dispose()}),this.renderTarget.dispose(),this.copyPass=void 0,this.gammaCorrectionPass=void 0,this.smaaPass=void 0,this.ssaaPass=void 0,this.fxaaPass=void 0,this.bloomController=void 0,this.outlineController=void 0,this.ssrController=void 0},z}(),ye=function(){"use strict";function z(a){(0,x.Z)(this,z),this.raycaster=new n.Raycaster,this.installPlugins=new Map,this.event=new O.EventEmitter,this.clock=new n.Clock,this.options=M()(z.options,a,{isMergeableObject:u.isPlainObject});var e=this.options,t=e.container,r=e.stats,l=e.gui;if(l){var d=new(K());d.open(!1),this.gui=d}if(r){var i=new(V());i.showPanel(0),i.dom.style.position="absolute",t.appendChild(i.dom),this.stats=i}this.init(),this.initComposer(),this.initCSSRenderer(),this.initControl(),this.clock.getDelta(),this.clock.getElapsedTime()}var g=z.prototype;return g.use=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),l=1;l<t;l++)r[l-1]=arguments[l];if(this.installPlugins.has(e))console.log("plugin already installed");else if(typeof e.install=="function"){var d;(d=e).install.apply(d,[this].concat((0,P.Z)(r))),this.installPlugins.set(e,!0)}},g.init=function(){var e=this,t=this.options,r=t.container,l=t.isdev,d=t.axesHelper,i=t.renderer,b=t.scene,Z=t.camera,j=this.getSize(),E=j.width,A=j.height,I=new C({isdev:l,width:E,height:A,cameraParams:Z});this.gui&&I.setGui(this.gui);var W=I.camera,J=new p({camera:W,sceneParams:b}),$=J.scene,ae=new D({width:E,height:A,scene:$,camera:W,isdev:l,rendererParams:(0,y.Z)((0,c.Z)({},i),{outputEncoding:n.LinearEncoding,antialias:!1})});this.gui&&ae.setGui(this.gui);var se=ae.renderer;d&&J.addAxesHelper(),this.sceneController=J,this.rendererController=ae,this.cameraController=I,r.appendChild(se.domElement);var oe=new ResizeObserver(function(ve){var me=!0,_e=!1,Re=void 0;try{for(var we=ve[Symbol.iterator](),Me;!(me=(Me=we.next()).done);me=!0){var Ye=Me.value,Ee=Ye.contentRect;e.handeleResize(Ee.width,Ee.height)}}catch($e){_e=!0,Re=$e}finally{try{!me&&we.return!=null&&we.return()}finally{if(_e)throw Re}}});oe.observe(r),this.resizeObserver=oe},g.initComposer=function(){var e=this.options,t=e.bloom,r=e.outline,l=e.ssr,d=e.renderer,i=e.bloomParams,b=e.outlineParams,Z=e.ssrParams,j=e.multisampling,E=d.antialias;E==="msaa"&&!Ce&&(E=!1,console.warn("MSAA is not supported on this browser"));var A=new Ke({renderer:this.renderer,scene:this.scene,camera:this.camera,gui:this.gui,composerParams:{multisampling:E==="msaa"?j:0,type:n.UnsignedByteType,encoding:d.outputEncoding}});this.composerController=A,E==="ssaa"&&A.addSSAAPass(),l&&A.addSSRPass(Z),t&&A.addBloomPass(i),r&&A.addOutlinePass(b),d.outputEncoding===n.sRGBEncoding&&A.addGammaCorrectionPass(),E==="fxaa"?A.addFXAAPass():E==="smaa"&&A.addSMAAPass(),A.checkCopyPass(),this.event.on("passcheck",function(){A.checkCopyPass()})},g.initCSSRenderer=function(){var e=this.options,t=e.container,r=e.css2DRenderer,l=e.css3DRenderer,d=e.css2DRendererParams,i=e.css3DRendererParams;if(r||l){var b=new h(t);r&&b.addRenderer("css2d",d),l&&b.addRenderer("css3d",i),this.cssRendererController=b}},g.initControl=function(){var e=this.options,t=e.control,r=e.mapControl,l=e.controlParams;if(t){var d=new U({camera:this.camera,controlParams:{domElement:(l==null?void 0:l.domElement)||this.renderer.domElement},mapControl:r});this.controlController=d}},g.getSize=function(){var e=this.options.container;return{width:e.offsetWidth,height:e.offsetHeight}},g.handeleResize=function(e,t){var r=this,l=r.rendererController,d=r.cameraController,i=r.composerController,b=r.cssRendererController;d==null||d.setSize(e,t),l==null||l.setSize(e,t),i==null||i.setSize(e,t),b==null||b.setSize(e,t),this.installPlugins.forEach(function(Z,j){var E;(E=j.resize)===null||E===void 0||E.call(j,{width:e,height:t})}),this.event.emit("resize",{width:e,height:t})},g.pick=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,l=this,d=l.raycaster,i=l.options,b=i.container,Z=new n.Vector2,j=b.getBoundingClientRect();if(Z.x=(e.clientX-j.left)/(j.right-j.left)*2-1,Z.y=-((e.clientY-j.top)/(j.bottom-j.top))*2+1,this.camera&&this.scene){d.setFromCamera(Z,this.camera);var E=d.intersectObjects(t||this.scene.children,r);if(E.length)return{object:E[0].object,intersects:E}}},g.render=function(){var e,t,r,l,d=this,i=d.renderer,b=d.scene,Z=d.camera,j=d.clock;if(!(!i||!b||!Z||this.options.staticRender&&!this.cameraController.checkCameraChange())){var E=j.getDelta(),A=j.getElapsedTime();if(i.clear(),s().update(),(e=this.controlController)===null||e===void 0||e.update(),this.installPlugins.forEach(function(W,J){var $;($=J.update)===null||$===void 0||$.call(J,E,A)}),!((t=this.composerController)===null||t===void 0)&&t.active)this.composerController.render();else{var I;(I=this.rendererController)===null||I===void 0||I.render()}(r=this.cssRendererController)===null||r===void 0||r.render(b,Z),(l=this.stats)===null||l===void 0||l.update(),this.event.emit("render",{delta:E,elapsed:A})}},g.start=function(){this.renderer.setAnimationLoop(this.render.bind(this)),this.event.emit("start")},g.stop=function(){this.renderer.setAnimationLoop(null),this.event.emit("stop")},g.dispose=function(){var e,t,r,l,d,i,b;this.stop(),s().removeAll(),this.handeleResize(0,0),(e=this.resizeObserver)===null||e===void 0||e.unobserve(this.options.container),this.installPlugins.forEach(function(Z,j){var E;(E=j.dispose)===null||E===void 0||E.call(j)}),(t=this.controlController)===null||t===void 0||t.dispose(),(r=this.cssRendererController)===null||r===void 0||r.dispose(),(l=this.sceneController)===null||l===void 0||l.dispose(),(d=this.composerController)===null||d===void 0||d.dispose(),(i=this.rendererController)===null||i===void 0||i.dispose(),this.controlController=void 0,this.cssRendererController=void 0,(b=this.gui)===null||b===void 0||b.destroy(),this.event.removeAllListeners(),this.installPlugins.clear()},(0,_.Z)(z,[{key:"renderer",get:function(){return this.rendererController.renderer}},{key:"control",get:function(){var e;return(e=this.controlController)===null||e===void 0?void 0:e.control}},{key:"camera",get:function(){return this.cameraController.camera}},{key:"scene",get:function(){return this.sceneController.scene}}]),z}();ye.options={isdev:pe,stats:pe,gui:pe,axesHelper:pe,control:pe,renderer:(0,y.Z)((0,c.Z)({},k),{antialias:Ce?"msaa":"smaa"}),staticRender:!1,multisampling:8,scene:o,camera:R,bloom:!1,bloomParams:ze,outline:!1,outlineParams:Ue,css2DRenderer:!1,ssr:!1,ssrParams:We,css2DRendererParams:(0,c.Z)({},v),css3DRenderer:!1,css3DRendererParams:(0,c.Z)({},v)};var Qe=H(701)})(),module.exports=be})();
@@ -0,0 +1,32 @@
1
+ import {BufferGeometry} from 'three';
2
+
3
+ type PolygonCoords = number[][][];
4
+
5
+ type Parameters = {
6
+ polygonGeoJson: PolygonCoords;
7
+ startHeight: number;
8
+ endHeight: number;
9
+ closedBottom: boolean;
10
+ closedTop: boolean;
11
+ includeSides: boolean;
12
+ curvatureResolution: number;
13
+ cartesian: boolean;
14
+ };
15
+
16
+ export default class PolygonGeometry extends BufferGeometry {
17
+ constructor(
18
+ polygonGeoJson: PolygonCoords,
19
+ parameters?: {
20
+ startHeight?: number;
21
+ endHeight?: number;
22
+ closedBottom?: boolean;
23
+ closedTop?: boolean;
24
+ includeSides?: boolean;
25
+ curvatureResolution?: number;
26
+ cartesian?: boolean;
27
+ userDataRsoOffset?: number;
28
+ }
29
+ );
30
+
31
+ parameters: Parameters;
32
+ }
@@ -0,0 +1,11 @@
1
+ export default geoPolygonTriangulate;
2
+ declare function geoPolygonTriangulate(polygon: any, { resolution }?: {
3
+ resolution?: number | undefined;
4
+ }): {
5
+ contour: any;
6
+ triangles: {
7
+ points: any[];
8
+ indices: any;
9
+ uvs: any[][];
10
+ };
11
+ };
@@ -0,0 +1,19 @@
1
+ import * as THREE from 'three';
2
+ import { BaseObject } from '../../index';
3
+ interface Options {
4
+ geojson: number[][][];
5
+ material: THREE.Material | THREE.Material[];
6
+ startHeight?: number;
7
+ height?: number;
8
+ closedBottom?: boolean;
9
+ closedTop?: boolean;
10
+ curvatureResolution?: number;
11
+ cartesian?: boolean;
12
+ userDataRsoOffset?: number;
13
+ }
14
+ export default class extends BaseObject {
15
+ options: Required<Options>;
16
+ constructor(options: Options);
17
+ create(): void;
18
+ }
19
+ export {};
@@ -4,3 +4,4 @@ export { default as Video } from './video';
4
4
  export { default as Node } from './node';
5
5
  export { MeshLine, MeshLineMaterial, MeshLineRaycast } from './line/meshLine';
6
6
  export { default as Line } from './line';
7
+ export { default as Conic } from './conic';
@@ -1,6 +1,45 @@
1
- (function(){var Ae={666:function(A){var P=function(y){"use strict";var R=Object.prototype,S=R.hasOwnProperty,j,_=typeof Symbol=="function"?Symbol:{},E=_.iterator||"@@iterator",F=_.asyncIterator||"@@asyncIterator",L=_.toStringTag||"@@toStringTag";function k(s,o,l){return Object.defineProperty(s,o,{value:l,enumerable:!0,configurable:!0,writable:!0}),s[o]}try{k({},"")}catch(s){k=function(o,l,m){return o[l]=m}}function $(s,o,l,m){var v=o&&o.prototype instanceof M?o:M,T=Object.create(v.prototype),N=new ce(m||[]);return T._invoke=J(s,l,N),T}y.wrap=$;function H(s,o,l){try{return{type:"normal",arg:s.call(o,l)}}catch(m){return{type:"throw",arg:m}}}var B="suspendedStart",c="suspendedYield",ie="executing",V="completed",W={};function M(){}function D(){}function z(){}var ee={};k(ee,E,function(){return this});var te=Object.getPrototypeOf,re=te&&te(te(ae([])));re&&re!==R&&S.call(re,E)&&(ee=re);var q=z.prototype=M.prototype=Object.create(ee);D.prototype=z,k(q,"constructor",z),k(z,"constructor",D),D.displayName=k(z,L,"GeneratorFunction");function ne(s){["next","throw","return"].forEach(function(o){k(s,o,function(l){return this._invoke(o,l)})})}y.isGeneratorFunction=function(s){var o=typeof s=="function"&&s.constructor;return o?o===D||(o.displayName||o.name)==="GeneratorFunction":!1},y.mark=function(s){return Object.setPrototypeOf?Object.setPrototypeOf(s,z):(s.__proto__=z,k(s,L,"GeneratorFunction")),s.prototype=Object.create(q),s},y.awrap=function(s){return{__await:s}};function oe(s,o){function l(T,N,Y,Q){var K=H(s[T],s,N);if(K.type==="throw")Q(K.arg);else{var he=K.arg,ue=he.value;return ue&&typeof ue=="object"&&S.call(ue,"__await")?o.resolve(ue.__await).then(function(I){l("next",I,Y,Q)},function(I){l("throw",I,Y,Q)}):o.resolve(ue).then(function(I){he.value=I,Y(he)},function(I){return l("throw",I,Y,Q)})}}var m;function v(T,N){function Y(){return new o(function(Q,K){l(T,N,Q,K)})}return m=m?m.then(Y,Y):Y()}this._invoke=v}ne(oe.prototype),k(oe.prototype,F,function(){return this}),y.AsyncIterator=oe,y.async=function(s,o,l,m,v){v===void 0&&(v=Promise);var T=new oe($(s,o,l,m),v);return y.isGeneratorFunction(o)?T:T.next().then(function(N){return N.done?N.value:T.next()})};function J(s,o,l){var m=B;return function(T,N){if(m===ie)throw new Error("Generator is already running");if(m===V){if(T==="throw")throw N;return pe()}for(l.method=T,l.arg=N;;){var Y=l.delegate;if(Y){var Q=se(Y,l);if(Q){if(Q===W)continue;return Q}}if(l.method==="next")l.sent=l._sent=l.arg;else if(l.method==="throw"){if(m===B)throw m=V,l.arg;l.dispatchException(l.arg)}else l.method==="return"&&l.abrupt("return",l.arg);m=ie;var K=H(s,o,l);if(K.type==="normal"){if(m=l.done?V:c,K.arg===W)continue;return{value:K.arg,done:l.done}}else K.type==="throw"&&(m=V,l.method="throw",l.arg=K.arg)}}}function se(s,o){var l=s.iterator[o.method];if(l===j){if(o.delegate=null,o.method==="throw"){if(s.iterator.return&&(o.method="return",o.arg=j,se(s,o),o.method==="throw"))return W;o.method="throw",o.arg=new TypeError("The iterator does not provide a 'throw' method")}return W}var m=H(l,s.iterator,o.arg);if(m.type==="throw")return o.method="throw",o.arg=m.arg,o.delegate=null,W;var v=m.arg;if(!v)return o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,W;if(v.done)o[s.resultName]=v.value,o.next=s.nextLoc,o.method!=="return"&&(o.method="next",o.arg=j);else return v;return o.delegate=null,W}ne(q),k(q,L,"Generator"),k(q,E,function(){return this}),k(q,"toString",function(){return"[object Generator]"});function fe(s){var o={tryLoc:s[0]};1 in s&&(o.catchLoc=s[1]),2 in s&&(o.finallyLoc=s[2],o.afterLoc=s[3]),this.tryEntries.push(o)}function le(s){var o=s.completion||{};o.type="normal",delete o.arg,s.completion=o}function ce(s){this.tryEntries=[{tryLoc:"root"}],s.forEach(fe,this),this.reset(!0)}y.keys=function(s){var o=[];for(var l in s)o.push(l);return o.reverse(),function m(){for(;o.length;){var v=o.pop();if(v in s)return m.value=v,m.done=!1,m}return m.done=!0,m}};function ae(s){if(s){var o=s[E];if(o)return o.call(s);if(typeof s.next=="function")return s;if(!isNaN(s.length)){var l=-1,m=function v(){for(;++l<s.length;)if(S.call(s,l))return v.value=s[l],v.done=!1,v;return v.value=j,v.done=!0,v};return m.next=m}}return{next:pe}}y.values=ae;function pe(){return{value:j,done:!0}}return ce.prototype={constructor:ce,reset:function(s){if(this.prev=0,this.next=0,this.sent=this._sent=j,this.done=!1,this.delegate=null,this.method="next",this.arg=j,this.tryEntries.forEach(le),!s)for(var o in this)o.charAt(0)==="t"&&S.call(this,o)&&!isNaN(+o.slice(1))&&(this[o]=j)},stop:function(){this.done=!0;var s=this.tryEntries[0],o=s.completion;if(o.type==="throw")throw o.arg;return this.rval},dispatchException:function(s){if(this.done)throw s;var o=this;function l(Q,K){return T.type="throw",T.arg=s,o.next=Q,K&&(o.method="next",o.arg=j),!!K}for(var m=this.tryEntries.length-1;m>=0;--m){var v=this.tryEntries[m],T=v.completion;if(v.tryLoc==="root")return l("end");if(v.tryLoc<=this.prev){var N=S.call(v,"catchLoc"),Y=S.call(v,"finallyLoc");if(N&&Y){if(this.prev<v.catchLoc)return l(v.catchLoc,!0);if(this.prev<v.finallyLoc)return l(v.finallyLoc)}else if(N){if(this.prev<v.catchLoc)return l(v.catchLoc,!0)}else if(Y){if(this.prev<v.finallyLoc)return l(v.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(s,o){for(var l=this.tryEntries.length-1;l>=0;--l){var m=this.tryEntries[l];if(m.tryLoc<=this.prev&&S.call(m,"finallyLoc")&&this.prev<m.finallyLoc){var v=m;break}}v&&(s==="break"||s==="continue")&&v.tryLoc<=o&&o<=v.finallyLoc&&(v=null);var T=v?v.completion:{};return T.type=s,T.arg=o,v?(this.method="next",this.next=v.finallyLoc,W):this.complete(T)},complete:function(s,o){if(s.type==="throw")throw s.arg;return s.type==="break"||s.type==="continue"?this.next=s.arg:s.type==="return"?(this.rval=this.arg=s.arg,this.method="return",this.next="end"):s.type==="normal"&&o&&(this.next=o),W},finish:function(s){for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o];if(l.finallyLoc===s)return this.complete(l.completion,l.afterLoc),le(l),W}},catch:function(s){for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o];if(l.tryLoc===s){var m=l.completion;if(m.type==="throw"){var v=m.arg;le(l)}return v}}throw new Error("illegal catch attempt")},delegateYield:function(s,o,l){return this.delegate={iterator:ae(s),resultName:o,nextLoc:l},this.method==="next"&&(this.arg=j),W}},y}(A.exports);try{regeneratorRuntime=P}catch(y){typeof globalThis=="object"?globalThis.regeneratorRuntime=P:Function("r","regeneratorRuntime = r")(P)}},695:function(A,P,y){"use strict";y.d(P,{Z:function(){return R}});function R(S){if(S.geometry&&S.geometry.dispose(),S.material){var j=Array.isArray(S.material)?S.material:[S.material];j.forEach(function(_){var E,F,L,k,$,H,B,c,ie,V,W,M,D;(E=_.map)===null||E===void 0||E.dispose(),(F=_.lightMap)===null||F===void 0||F.dispose(),(L=_.bumpMap)===null||L===void 0||L.dispose(),(k=_.normalMap)===null||k===void 0||k.dispose(),($=_.specularMap)===null||$===void 0||$.dispose(),(H=_.envMap)===null||H===void 0||H.dispose(),(B=_.alphaMap)===null||B===void 0||B.dispose(),(c=_.aoMap)===null||c===void 0||c.dispose(),(ie=_.displacementMap)===null||ie===void 0||ie.dispose(),(V=_.emissiveMap)===null||V===void 0||V.dispose(),(W=_.gradientMap)===null||W===void 0||W.dispose(),(M=_.metalnessMap)===null||M===void 0||M.dispose(),(D=_.roughnessMap)===null||D===void 0||D.dispose(),_.dispose()})}}},519:function(A,P,y){"use strict";y.d(P,{disposeMesh:function(){return _.Z}});var R=y(666),S=y.n(R),j=null,_=y(695),E=y(644);function F(V){if(V.material){var W=Array.isArray(V.material)?V.material:[V.material];W.forEach(function(M){var D,z;(D=M.color)===null||D===void 0||D.convertSRGBToLinear(),(z=M.emissive)===null||z===void 0||z.convertSRGBToLinear(),M.map&&(M.map.encoding=THREE.sRGBEncoding),M.emissiveMap&&(M.emissiveMap.encoding=THREE.sRGBEncoding)})}}var L=y(568),k=y(924),$=require("idb-keyval"),H=y(484),B=null,c=null,ie=function(){var V=(0,L.Z)(S().mark(function W(M,D){var z,ee,te,re,q,ne;return S().wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return z=D.version,J.next=4,(0,$.get)(M);case 4:if(te=J.sent,!(te&&te[z])){J.next=9;break}ee=te[z],J.next=15;break;case 9:return J.next=11,(0,H.Z)(fetch(M).then(function(se){if(se.ok)return se.blob();throw new Error}));case 11:re=J.sent,q=re.res,ne=re.err,ne||(ee=q,(0,$.set)(M,(0,k.Z)({},z,q)));case 15:return J.abrupt("return",ee?{url:URL.createObjectURL(ee)}:{url:M});case 16:case"end":return J.stop()}},W)}));return function(M,D){return V.apply(this,arguments)}}()},484:function(A,P,y){"use strict";y.d(P,{Z:function(){return S}});var R=y(42);function S(j){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return j.then(function(E){return(0,R.Z)({err:null,res:E},_)}).catch(function(E){return(0,R.Z)({err:E,res:void 0},_)})}},644:function(A){"use strict";A.exports=require("three")},568:function(A,P,y){"use strict";y.d(P,{Z:function(){return S}});function R(j,_,E,F,L,k,$){try{var H=j[k]($),B=H.value}catch(c){E(c);return}H.done?_(B):Promise.resolve(B).then(F,L)}function S(j){return function(){var _=this,E=arguments;return new Promise(function(F,L){var k=j.apply(_,E);function $(B){R(k,F,L,$,H,"next",B)}function H(B){R(k,F,L,$,H,"throw",B)}$(void 0)})}}},924:function(A,P,y){"use strict";y.d(P,{Z:function(){return R}});function R(S,j,_){return j in S?Object.defineProperty(S,j,{value:_,enumerable:!0,configurable:!0,writable:!0}):S[j]=_,S}},42:function(A,P,y){"use strict";y.d(P,{Z:function(){return S}});var R=y(924);function S(j){for(var _=1;_<arguments.length;_++){var E=arguments[_]!=null?arguments[_]:{},F=Object.keys(E);typeof Object.getOwnPropertySymbols=="function"&&(F=F.concat(Object.getOwnPropertySymbols(E).filter(function(L){return Object.getOwnPropertyDescriptor(E,L).enumerable}))),F.forEach(function(L){(0,R.Z)(j,L,E[L])})}return j}}},ge={};function Z(A){var P=ge[A];if(P!==void 0)return P.exports;var y=ge[A]={exports:{}};return Ae[A](y,y.exports,Z),y.exports}(function(){Z.n=function(A){var P=A&&A.__esModule?function(){return A.default}:function(){return A};return Z.d(P,{a:P}),P}})(),function(){Z.d=function(A,P){for(var y in P)Z.o(P,y)&&!Z.o(A,y)&&Object.defineProperty(A,y,{enumerable:!0,get:P[y]})}}(),function(){Z.o=function(A,P){return Object.prototype.hasOwnProperty.call(A,P)}}(),function(){Z.r=function(A){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})}}();var ve={};(function(){"use strict";Z.r(ve),Z.d(ve,{Image:function(){return m},Line:function(){return Ce},MeshLine:function(){return I},MeshLineMaterial:function(){return me},MeshLineRaycast:function(){return be},Node:function(){return K},Text:function(){return pe},Video:function(){return Y}});function A(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}function P(e,i){return P=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},P(e,i)}function y(e,i){return P(e,i)}function R(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(i&&i.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),i&&y(e,i)}var S=Z(42);function j(e,i){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);i&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _(e,i){return i=i!=null?i:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):j(Object(i)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(i,r))}),e}function E(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},F(e)}function L(e){return F(e)}function k(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $(e){return e&&e.constructor===Symbol?"symbol":typeof e}function H(e,i){return i&&($(i)==="object"||typeof i=="function")?i:k(e)}function B(e){var i=E();return function(){var n=L(e),a;if(i){var t=L(this).constructor;a=Reflect.construct(n,arguments,t)}else a=n.apply(this,arguments);return H(this,a)}}var c=Z(644);function ie(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function V(e,i,r){return ie()?V=Reflect.construct:V=function(a,t,u){var h=[null];h.push.apply(h,t);var p=Function.bind.apply(a,h),d=new p;return u&&y(d,u.prototype),d},V.apply(null,arguments)}function W(e,i,r){return V.apply(null,arguments)}function M(e,i){for(var r=0;r<i.length;r++){var n=i[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function D(e,i,r){return i&&M(e.prototype,i),r&&M(e,r),e}function z(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);r<i;r++)n[r]=e[r];return n}function ee(e){if(Array.isArray(e))return z(e)}function te(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function re(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function q(e,i){if(!!e){if(typeof e=="string")return z(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return z(e,i)}}function ne(e){return ee(e)||te(e)||q(e)||re()}var oe=Z(484);function J(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r={};return r.promise=new Promise(function(n,a){r.resolve=n,r.reject=a}),e&&(r.promise=(0,oe.Z)(r.promise,i)),r}var se=require("three/examples/jsm/renderers/CSS2DRenderer"),fe=require("three/examples/jsm/renderers/CSS3DRenderer"),le=Z(519),ce=function(e){e&&((0,le.disposeMesh)(e),e.children.forEach(function(i){i.userData.BaseObject_||ce(i)}))},ae=function(){"use strict";function e(){A(this,e),this.objecttype__="BaseObject",this.userData={},this.pm=J(),this.visible=!1}var i=e.prototype;return i.init=function(){},i.create=function(){},i.render=function(){},i.update=function(n,a){},i.resize=function(n,a){},i.show=function(){return this.object3d&&(this.object3d.visible=!0),this.visible=!0,this},i.hide=function(){return this.object3d&&(this.object3d.visible=!1),this.visible=!1,this},i.isVisible=function(){return this.visible},i.createMesh=function(){for(var n=arguments.length,a=new Array(n),t=0;t<n;t++)a[t]=arguments[t];return this.object3d=W(c.Mesh,ne(a)),this},i.createGroup=function(){return this.object3d=new c.Group,this},i.createPoints=function(){for(var n=arguments.length,a=new Array(n),t=0;t<n;t++)a[t]=arguments[t];return this.object3d=W(c.Points,ne(a)),this},i.createCSS2DObject=function(n){return this.object3d=new se.CSS2DObject(n),this},i.createCSS3DObject=function(n){return this.object3d=new fe.CSS3DObject(n),this},i.createCSS3DSprite=function(n){return this.object3d=new fe.CSS3DSprite(n),this},i.createSprite=function(n){return this.object3d=new c.Sprite(n),this},i.add=function(){for(var n=arguments.length,a=new Array(n),t=0;t<n;t++)a[t]=arguments[t];var u;return(u=this.object3d).add.apply(u,ne(a)),this},i.remove=function(){for(var n=arguments.length,a=new Array(n),t=0;t<n;t++)a[t]=arguments[t];var u;return(u=this.object3d).remove.apply(u,ne(a)),this},i.getSize=function(){var n=new c.Box3().setFromObject(this.object3d);return{min:n.min,max:n.max,size:n.getSize(new c.Vector3)}},i.traverse=function(n){n(this),this.children.forEach(function(a){a.traverse(n)})},i.dispose=function(){ce(this.object3d)},D(e,[{key:"parent",get:function(){var n=this.object3d.parent;return(n==null?void 0:n.userData.BaseObject_)||this.pencil.scene}},{key:"children",get:function(){return this.object3d.children.map(function(n){return n.userData.BaseObject_}).filter(function(n){return!!n})}}]),e}(),pe=function(e){"use strict";R(r,e);var i=B(r);function r(a){A(this,r);var t;return t=i.call(this),t.width=0,t.canvas=document.createElement("canvas"),t.options=(0,S.Z)({},{scale:.5,fontSize:28,fontFamily:"system-ui,-apple-system,BlinkMacSystemFont,sans-serif",fontWeight:"normal",flipX:!1,sprite:!1,sizeAttenuation:!0},a),t}var n=r.prototype;return n.create=function(){var t=this.options,u=t.position,h=t.lookAt,p=t.sprite,d=t.text,g=t.sizeAttenuation;if(p){var b=new c.Sprite(new c.SpriteMaterial({transparent:!0,sizeAttenuation:g}));this.object3d=b}else{var w=new c.MeshBasicMaterial({side:c.DoubleSide,transparent:!0}),O=new c.PlaneGeometry(1,1,1,1);this.createMesh(O,w)}this.object3d.position.copy(u),h&&this.object3d.lookAt(h),this.setText(d)},n.setText=function(t,u){var h=(0,S.Z)(_((0,S.Z)({},this.options),{text:t}),u||{}),p=h.text,d=h.fontSize,g=h.fontFamily,b=h.fontWeight,w=h.flipX,O=h.scale,x=this.canvas;x.width=d*p.length*2,x.height=d;var C=x.getContext("2d");C.font="".concat(b," ").concat(d,"px/1 ").concat(g);var f=C.measureText(p).width;x.width=f,this.width=f,C=x.getContext("2d"),C.clearRect(0,0,x.width,x.height),w&&C.scale(-1,1),C.font="".concat(b," ").concat(d,"px/1 ").concat(g),C.textBaseline="middle",C.fillStyle="#ffffff",C.fillText(p,w?f*-1:0,x.height/2),C.restore();var U=new c.Texture(x);U.anisotropy=16,U.needsUpdate=!0;var G=this.object3d;G.material.map&&G.material.map.dispose(),G.material.map=U,G.material.needsUpdate=!0,G.scale.set(U.image.width*O,U.image.height*O,1)},r}(ae),s=Z(568),o=Z(666),l=Z.n(o),m=function(e){"use strict";R(r,e);var i=B(r);function r(a){A(this,r);var t;return t=i.call(this),t.options=a,t}var n=r.prototype;return n.getMaterial=function(){var t=this;return(0,s.Z)(l().mark(function u(){var h,p,d,g,b,w,O,x,C,f;return l().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return h=t.options,p=h.transparent,d=h.blending,g=h.src,b=h.depthWrite,w=h.alphaTest,O=h.sprite,x=h.sizeAttenuation,G.next=3,new c.TextureLoader().loadAsync(g);case 3:return C=G.sent,f=O?new c.SpriteMaterial({map:C,transparent:p!=null?p:!1,blending:d!=null?d:c.NormalBlending,depthWrite:b!=null?b:!0,alphaTest:w!=null?w:0,sizeAttenuation:x!=null?x:!0}):new c.MeshBasicMaterial({map:C,transparent:p!=null?p:!1,blending:d!=null?d:c.NormalBlending,depthWrite:b!=null?b:!0,alphaTest:w!=null?w:0}),G.abrupt("return",f);case 6:case"end":return G.stop()}},u)}))()},n.create=function(){var t=this;return(0,s.Z)(l().mark(function u(){var h,p,d,g,b,w,O,x;return l().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(h=t.options,p=h.scale,d=h.position,g=h.src,b=h.cache,w=h.sprite,!(b&&!b.get(g))){f.next=7;break}return b.init(g),f.next=5,t.getMaterial();case 5:O=f.sent,b.set(g,O);case 7:if(!b){f.next=13;break}return f.next=10,b.get(g);case 10:f.t0=f.sent,f.next=16;break;case 13:return f.next=15,t.getMaterial();case 15:f.t0=f.sent;case 16:x=f.t0,t.texture=x.map,w?t.createSprite(x):t.createMesh(new c.PlaneBufferGeometry(1,1),x),p&&t.object3d.scale.set(x.map.image.width*p,x.map.image.height*p,1),d&&t.object3d.position.copy(d);case 21:case"end":return f.stop()}},u)}))()},r}(ae);function v(e,i){for(;!Object.prototype.hasOwnProperty.call(e,i)&&(e=L(e),e!==null););return e}function T(e,i,r){return typeof Reflect!="undefined"&&Reflect.get?T=Reflect.get:T=function(a,t,u){var h=v(a,t);if(!!h){var p=Object.getOwnPropertyDescriptor(h,t);return p.get?p.get.call(u||a):p.value}},T(e,i,r)}function N(e,i,r){return T(e,i,r)}var Y=function(e){"use strict";R(r,e);var i=B(r);function r(a){A(this,r);var t;return t=i.call(this),t.options=(0,S.Z)({},{autoPlay:!0,loop:!0},a),t}var n=r.prototype;return n.getMaterial=function(){var t=this.options,u=t.src,h=t.transparent,p=t.blending,d=t.depthWrite,g=t.format,b=t.autoPlay,w=t.loop,O=t.alphaTest,x=t.sprite,C=J(),f=document.createElement("video");return f.addEventListener("loadedmetadata",function(){var U=new c.VideoTexture(f);U.format=g!=null?g:c.RGBAFormat,U.needsUpdate=!0;var G=x?new c.SpriteMaterial({map:U,transparent:h!=null?h:!1,blending:p!=null?p:c.NormalBlending,depthWrite:d!=null?d:!0,alphaTest:O!=null?O:0}):new c.MeshBasicMaterial({map:U,transparent:h!=null?h:!1,blending:p!=null?p:c.NormalBlending,depthWrite:d!=null?d:!0,alphaTest:O!=null?O:0});C.resolve(G)},!1),f.src=u,f.muted=!0,f.autoplay=b,f.loop=w,f.preload="auto",C.promise},n.create=function(){var t=this;return(0,s.Z)(l().mark(function u(){var h,p,d,g,b,w,O,x;return l().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(h=t.options,p=h.scale,d=h.position,g=h.src,b=h.cache,w=h.sprite,!(b&&!b.get(g))){f.next=7;break}return b.init(g),f.next=5,t.getMaterial();case 5:O=f.sent,b.set(g,O);case 7:if(!b){f.next=13;break}return f.next=10,b.get(g);case 10:f.t0=f.sent,f.next=16;break;case 13:return f.next=15,t.getMaterial();case 15:f.t0=f.sent;case 16:x=f.t0,t.video=x.map.image,w?t.createSprite(x):t.createMesh(new c.PlaneBufferGeometry(1,1),x),p&&t.object3d.scale.set(t.video.videoWidth*p,t.video.videoHeight*p,1),d&&t.object3d.position.copy(d);case 21:case"end":return f.stop()}},u)}))()},n.render=function(){var t=this.options.autoPlay;t&&this.video.play()},n.dispose=function(){this.video.pause(),this.video.src="",this.video.load(),N(L(r.prototype),"dispose",this).call(this)},r}(ae),Q=function(e){"use strict";R(r,e);var i=B(r);function r(a){A(this,r);var t;return t=i.call(this),t.options=(0,S.Z)({},a),t}var n=r.prototype;return n.create=function(){var t=this.options,u=t.position,h=t.children,p=t.onClick,d=t.zIndexFix,g=document.createElement("div");g.appendChild(h),this.createCSS2DObject(g),u&&this.object3d.position.copy(u),p&&g.addEventListener("click",p),d&&(this.object3d.userData.zIndexFix=d)},n.getMaterial=function(t){return(0,s.Z)(l().mark(function u(){var h,p,d,g;return l().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return h=document.createElement("canvas"),h.width=256,h.height=256,p=h.getContext("2d"),p.fillStyle="#ff0000",p.fillRect(0,0,256,256),d=new c.CanvasTexture(h),g=new c.SpriteMaterial({map:d,opacity:t?1:0,transparent:!0,alphaTest:.1,sizeAttenuation:!1}),w.abrupt("return",g);case 9:case"end":return w.stop()}},u)}))()},n.createPickObject=function(t){var u=t.show,h=u===void 0?!1:u,p=t.scale,d=p===void 0?new c.Vector3(1,1,1):p,g=t.position,b=g===void 0?new c.Vector3(0,0,0):g,w=t.cache,O=this;return(0,s.Z)(l().mark(function x(){var C,f,U,G;return l().wrap(function(X){for(;;)switch(X.prev=X.next){case 0:if(C="node-create-pick-object",!(w&&!w.get(C))){X.next=7;break}return w.init(C),X.next=5,O.getMaterial(h);case 5:f=X.sent,w.set(C,f);case 7:if(!w){X.next=13;break}return X.next=10,w.get(C);case 10:X.t0=X.sent,X.next=16;break;case 13:return X.next=15,O.getMaterial(h);case 15:X.t0=X.sent;case 16:U=X.t0,G=new c.Sprite(U),G.scale.set(U.map.image.width*d.x,U.map.image.height*d.y,1),G.position.copy(b),O.add(G),O.pickObject=G;case 22:case"end":return X.stop()}},x)}))()},n.dispose=function(){var t=this.options.onClick;if(t){var u;(u=this.object3d.element)===null||u===void 0||u.removeEventListener("click",t)}N(L(r.prototype),"dispose",this).call(this)},r}(ae),K=Q,he=`
2
- `.concat(c.ShaderChunk.logdepthbuf_pars_vertex,`
3
- `).concat(c.ShaderChunk.fog_pars_vertex,`
1
+ (function(){var tt={187:function(V){"use strict";var R=typeof Reflect=="object"?Reflect:null,f=R&&typeof R.apply=="function"?R.apply:function(v,_,M){return Function.prototype.apply.call(v,_,M)},j;R&&typeof R.ownKeys=="function"?j=R.ownKeys:Object.getOwnPropertySymbols?j=function(v){return Object.getOwnPropertyNames(v).concat(Object.getOwnPropertySymbols(v))}:j=function(v){return Object.getOwnPropertyNames(v)};function T(m){console&&console.warn&&console.warn(m)}var i=Number.isNaN||function(v){return v!==v};function h(){h.init.call(this)}V.exports=h,V.exports.once=K,h.EventEmitter=h,h.prototype._events=void 0,h.prototype._eventsCount=0,h.prototype._maxListeners=void 0;var A=10;function E(m){if(typeof m!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof m)}Object.defineProperty(h,"defaultMaxListeners",{enumerable:!0,get:function(){return A},set:function(m){if(typeof m!="number"||m<0||i(m))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+m+".");A=m}}),h.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},h.prototype.setMaxListeners=function(v){if(typeof v!="number"||v<0||i(v))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+v+".");return this._maxListeners=v,this};function Z(m){return m._maxListeners===void 0?h.defaultMaxListeners:m._maxListeners}h.prototype.getMaxListeners=function(){return Z(this)},h.prototype.emit=function(v){for(var _=[],M=1;M<arguments.length;M++)_.push(arguments[M]);var W=v==="error",Q=this._events;if(Q!==void 0)W=W&&Q.error===void 0;else if(!W)return!1;if(W){var Y;if(_.length>0&&(Y=_[0]),Y instanceof Error)throw Y;var ae=new Error("Unhandled error."+(Y?" ("+Y.message+")":""));throw ae.context=Y,ae}var me=Q[v];if(me===void 0)return!1;if(typeof me=="function")f(me,this,_);else for(var Me=me.length,be=le(me,Me),M=0;M<Me;++M)f(be[M],this,_);return!0};function l(m,v,_,M){var W,Q,Y;if(E(_),Q=m._events,Q===void 0?(Q=m._events=Object.create(null),m._eventsCount=0):(Q.newListener!==void 0&&(m.emit("newListener",v,_.listener?_.listener:_),Q=m._events),Y=Q[v]),Y===void 0)Y=Q[v]=_,++m._eventsCount;else if(typeof Y=="function"?Y=Q[v]=M?[_,Y]:[Y,_]:M?Y.unshift(_):Y.push(_),W=Z(m),W>0&&Y.length>W&&!Y.warned){Y.warned=!0;var ae=new Error("Possible EventEmitter memory leak detected. "+Y.length+" "+String(v)+" listeners added. Use emitter.setMaxListeners() to increase limit");ae.name="MaxListenersExceededWarning",ae.emitter=m,ae.type=v,ae.count=Y.length,T(ae)}return m}h.prototype.addListener=function(v,_){return l(this,v,_,!1)},h.prototype.on=h.prototype.addListener,h.prototype.prependListener=function(v,_){return l(this,v,_,!0)};function ne(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function ee(m,v,_){var M={fired:!1,wrapFn:void 0,target:m,type:v,listener:_},W=ne.bind(M);return W.listener=_,M.wrapFn=W,W}h.prototype.once=function(v,_){return E(_),this.on(v,ee(this,v,_)),this},h.prototype.prependOnceListener=function(v,_){return E(_),this.prependListener(v,ee(this,v,_)),this},h.prototype.removeListener=function(v,_){var M,W,Q,Y,ae;if(E(_),W=this._events,W===void 0)return this;if(M=W[v],M===void 0)return this;if(M===_||M.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete W[v],W.removeListener&&this.emit("removeListener",v,M.listener||_));else if(typeof M!="function"){for(Q=-1,Y=M.length-1;Y>=0;Y--)if(M[Y]===_||M[Y].listener===_){ae=M[Y].listener,Q=Y;break}if(Q<0)return this;Q===0?M.shift():ce(M,Q),M.length===1&&(W[v]=M[0]),W.removeListener!==void 0&&this.emit("removeListener",v,ae||_)}return this},h.prototype.off=h.prototype.removeListener,h.prototype.removeAllListeners=function(v){var _,M,W;if(M=this._events,M===void 0)return this;if(M.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):M[v]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete M[v]),this;if(arguments.length===0){var Q=Object.keys(M),Y;for(W=0;W<Q.length;++W)Y=Q[W],Y!=="removeListener"&&this.removeAllListeners(Y);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(_=M[v],typeof _=="function")this.removeListener(v,_);else if(_!==void 0)for(W=_.length-1;W>=0;W--)this.removeListener(v,_[W]);return this};function te(m,v,_){var M=m._events;if(M===void 0)return[];var W=M[v];return W===void 0?[]:typeof W=="function"?_?[W.listener||W]:[W]:_?$(W):le(W,W.length)}h.prototype.listeners=function(v){return te(this,v,!0)},h.prototype.rawListeners=function(v){return te(this,v,!1)},h.listenerCount=function(m,v){return typeof m.listenerCount=="function"?m.listenerCount(v):ie.call(m,v)},h.prototype.listenerCount=ie;function ie(m){var v=this._events;if(v!==void 0){var _=v[m];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}h.prototype.eventNames=function(){return this._eventsCount>0?j(this._events):[]};function le(m,v){for(var _=new Array(v),M=0;M<v;++M)_[M]=m[M];return _}function ce(m,v){for(;v+1<m.length;v++)m[v]=m[v+1];m.pop()}function $(m){for(var v=new Array(m.length),_=0;_<v.length;++_)v[_]=m[_].listener||m[_];return v}function K(m,v){return new Promise(function(_,M){function W(Y){m.removeListener(v,Q),M(Y)}function Q(){typeof m.removeListener=="function"&&m.removeListener("error",W),_([].slice.call(arguments))}B(m,v,Q,{once:!0}),v!=="error"&&D(m,W,{once:!0})})}function D(m,v,_){typeof m.on=="function"&&B(m,"error",v,_)}function B(m,v,_,M){if(typeof m.on=="function")M.once?m.once(v,_):m.on(v,_);else if(typeof m.addEventListener=="function")m.addEventListener(v,function W(Q){M.once&&m.removeEventListener(v,W),_(Q)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof m)}},666:function(V){var R=function(f){"use strict";var j=Object.prototype,T=j.hasOwnProperty,i,h=typeof Symbol=="function"?Symbol:{},A=h.iterator||"@@iterator",E=h.asyncIterator||"@@asyncIterator",Z=h.toStringTag||"@@toStringTag";function l(S,P,z){return Object.defineProperty(S,P,{value:z,enumerable:!0,configurable:!0,writable:!0}),S[P]}try{l({},"")}catch(S){l=function(P,z,N){return P[z]=N}}function ne(S,P,z,N){var X=P&&P.prototype instanceof K?P:K,ue=Object.create(X.prototype),he=new be(N||[]);return ue._invoke=Y(S,z,he),ue}f.wrap=ne;function ee(S,P,z){try{return{type:"normal",arg:S.call(P,z)}}catch(N){return{type:"throw",arg:N}}}var te="suspendedStart",ie="suspendedYield",le="executing",ce="completed",$={};function K(){}function D(){}function B(){}var m={};l(m,A,function(){return this});var v=Object.getPrototypeOf,_=v&&v(v(Te([])));_&&_!==j&&T.call(_,A)&&(m=_);var M=B.prototype=K.prototype=Object.create(m);D.prototype=B,l(M,"constructor",B),l(B,"constructor",D),D.displayName=l(B,Z,"GeneratorFunction");function W(S){["next","throw","return"].forEach(function(P){l(S,P,function(z){return this._invoke(P,z)})})}f.isGeneratorFunction=function(S){var P=typeof S=="function"&&S.constructor;return P?P===D||(P.displayName||P.name)==="GeneratorFunction":!1},f.mark=function(S){return Object.setPrototypeOf?Object.setPrototypeOf(S,B):(S.__proto__=B,l(S,Z,"GeneratorFunction")),S.prototype=Object.create(M),S},f.awrap=function(S){return{__await:S}};function Q(S,P){function z(ue,he,fe,de){var pe=ee(S[ue],S,he);if(pe.type==="throw")de(pe.arg);else{var Oe=pe.arg,Ae=Oe.value;return Ae&&typeof Ae=="object"&&T.call(Ae,"__await")?P.resolve(Ae.__await).then(function(Ce){z("next",Ce,fe,de)},function(Ce){z("throw",Ce,fe,de)}):P.resolve(Ae).then(function(Ce){Oe.value=Ce,fe(Oe)},function(Ce){return z("throw",Ce,fe,de)})}}var N;function X(ue,he){function fe(){return new P(function(de,pe){z(ue,he,de,pe)})}return N=N?N.then(fe,fe):fe()}this._invoke=X}W(Q.prototype),l(Q.prototype,E,function(){return this}),f.AsyncIterator=Q,f.async=function(S,P,z,N,X){X===void 0&&(X=Promise);var ue=new Q(ne(S,P,z,N),X);return f.isGeneratorFunction(P)?ue:ue.next().then(function(he){return he.done?he.value:ue.next()})};function Y(S,P,z){var N=te;return function(ue,he){if(N===le)throw new Error("Generator is already running");if(N===ce){if(ue==="throw")throw he;return Le()}for(z.method=ue,z.arg=he;;){var fe=z.delegate;if(fe){var de=ae(fe,z);if(de){if(de===$)continue;return de}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(N===te)throw N=ce,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);N=le;var pe=ee(S,P,z);if(pe.type==="normal"){if(N=z.done?ce:ie,pe.arg===$)continue;return{value:pe.arg,done:z.done}}else pe.type==="throw"&&(N=ce,z.method="throw",z.arg=pe.arg)}}}function ae(S,P){var z=S.iterator[P.method];if(z===i){if(P.delegate=null,P.method==="throw"){if(S.iterator.return&&(P.method="return",P.arg=i,ae(S,P),P.method==="throw"))return $;P.method="throw",P.arg=new TypeError("The iterator does not provide a 'throw' method")}return $}var N=ee(z,S.iterator,P.arg);if(N.type==="throw")return P.method="throw",P.arg=N.arg,P.delegate=null,$;var X=N.arg;if(!X)return P.method="throw",P.arg=new TypeError("iterator result is not an object"),P.delegate=null,$;if(X.done)P[S.resultName]=X.value,P.next=S.nextLoc,P.method!=="return"&&(P.method="next",P.arg=i);else return X;return P.delegate=null,$}W(M),l(M,Z,"Generator"),l(M,A,function(){return this}),l(M,"toString",function(){return"[object Generator]"});function me(S){var P={tryLoc:S[0]};1 in S&&(P.catchLoc=S[1]),2 in S&&(P.finallyLoc=S[2],P.afterLoc=S[3]),this.tryEntries.push(P)}function Me(S){var P=S.completion||{};P.type="normal",delete P.arg,S.completion=P}function be(S){this.tryEntries=[{tryLoc:"root"}],S.forEach(me,this),this.reset(!0)}f.keys=function(S){var P=[];for(var z in S)P.push(z);return P.reverse(),function N(){for(;P.length;){var X=P.pop();if(X in S)return N.value=X,N.done=!1,N}return N.done=!0,N}};function Te(S){if(S){var P=S[A];if(P)return P.call(S);if(typeof S.next=="function")return S;if(!isNaN(S.length)){var z=-1,N=function X(){for(;++z<S.length;)if(T.call(S,z))return X.value=S[z],X.done=!1,X;return X.value=i,X.done=!0,X};return N.next=N}}return{next:Le}}f.values=Te;function Le(){return{value:i,done:!0}}return be.prototype={constructor:be,reset:function(S){if(this.prev=0,this.next=0,this.sent=this._sent=i,this.done=!1,this.delegate=null,this.method="next",this.arg=i,this.tryEntries.forEach(Me),!S)for(var P in this)P.charAt(0)==="t"&&T.call(this,P)&&!isNaN(+P.slice(1))&&(this[P]=i)},stop:function(){this.done=!0;var S=this.tryEntries[0],P=S.completion;if(P.type==="throw")throw P.arg;return this.rval},dispatchException:function(S){if(this.done)throw S;var P=this;function z(de,pe){return ue.type="throw",ue.arg=S,P.next=de,pe&&(P.method="next",P.arg=i),!!pe}for(var N=this.tryEntries.length-1;N>=0;--N){var X=this.tryEntries[N],ue=X.completion;if(X.tryLoc==="root")return z("end");if(X.tryLoc<=this.prev){var he=T.call(X,"catchLoc"),fe=T.call(X,"finallyLoc");if(he&&fe){if(this.prev<X.catchLoc)return z(X.catchLoc,!0);if(this.prev<X.finallyLoc)return z(X.finallyLoc)}else if(he){if(this.prev<X.catchLoc)return z(X.catchLoc,!0)}else if(fe){if(this.prev<X.finallyLoc)return z(X.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(S,P){for(var z=this.tryEntries.length-1;z>=0;--z){var N=this.tryEntries[z];if(N.tryLoc<=this.prev&&T.call(N,"finallyLoc")&&this.prev<N.finallyLoc){var X=N;break}}X&&(S==="break"||S==="continue")&&X.tryLoc<=P&&P<=X.finallyLoc&&(X=null);var ue=X?X.completion:{};return ue.type=S,ue.arg=P,X?(this.method="next",this.next=X.finallyLoc,$):this.complete(ue)},complete:function(S,P){if(S.type==="throw")throw S.arg;return S.type==="break"||S.type==="continue"?this.next=S.arg:S.type==="return"?(this.rval=this.arg=S.arg,this.method="return",this.next="end"):S.type==="normal"&&P&&(this.next=P),$},finish:function(S){for(var P=this.tryEntries.length-1;P>=0;--P){var z=this.tryEntries[P];if(z.finallyLoc===S)return this.complete(z.completion,z.afterLoc),Me(z),$}},catch:function(S){for(var P=this.tryEntries.length-1;P>=0;--P){var z=this.tryEntries[P];if(z.tryLoc===S){var N=z.completion;if(N.type==="throw"){var X=N.arg;Me(z)}return X}}throw new Error("illegal catch attempt")},delegateYield:function(S,P,z){return this.delegate={iterator:Te(S),resultName:P,nextLoc:z},this.method==="next"&&(this.arg=i),$}},f}(V.exports);try{regeneratorRuntime=R}catch(f){typeof globalThis=="object"?globalThis.regeneratorRuntime=R:Function("r","regeneratorRuntime = r")(R)}},701:function(V,R,f){"use strict";f.d(R,{ZP:function(){return ce}});var j=f(438),T=f(998);function i(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch($){return!1}}function h($,K,D){return i()?h=Reflect.construct:h=function(m,v,_){var M=[null];M.push.apply(M,v);var W=Function.bind.apply(m,M),Q=new W;return _&&(0,T.Z)(Q,_.prototype),Q},h.apply(null,arguments)}function A($,K,D){return h.apply(null,arguments)}var E=f(951),Z=f(342),l=f(644),ne=f(282),ee=require("three/examples/jsm/renderers/CSS2DRenderer"),te=f(530),ie=f(519),le=function($){$&&((0,ie.disposeMesh)($),$.children.forEach(function(K){K.userData.BaseObject_||le(K)}))},ce=function(){"use strict";function $(){(0,j.Z)(this,$),this.objecttype__="BaseObject",this.userData={},this.pm=(0,ne.Z)(),this.visible=!1}var K=$.prototype;return K.init=function(){},K.create=function(){},K.render=function(){},K.update=function(B,m){},K.resize=function(B,m){},K.show=function(){return this.object3d&&(this.object3d.visible=!0),this.visible=!0,this},K.hide=function(){return this.object3d&&(this.object3d.visible=!1),this.visible=!1,this},K.isVisible=function(){return this.visible},K.createMesh=function(){for(var B=arguments.length,m=new Array(B),v=0;v<B;v++)m[v]=arguments[v];return this.object3d=A(l.Mesh,(0,Z.Z)(m)),this},K.createGroup=function(){return this.object3d=new l.Group,this},K.createPoints=function(){for(var B=arguments.length,m=new Array(B),v=0;v<B;v++)m[v]=arguments[v];return this.object3d=A(l.Points,(0,Z.Z)(m)),this},K.createCSS2DObject=function(B){return this.object3d=new ee.CSS2DObject(B),this},K.createCSS3DObject=function(B){return this.object3d=new te.CSS3DObject(B),this},K.createCSS3DSprite=function(B){return this.object3d=new te.CSS3DSprite(B),this},K.createSprite=function(B){return this.object3d=new l.Sprite(B),this},K.add=function(){for(var B=arguments.length,m=new Array(B),v=0;v<B;v++)m[v]=arguments[v];var _;return(_=this.object3d).add.apply(_,(0,Z.Z)(m)),this},K.remove=function(){for(var B=arguments.length,m=new Array(B),v=0;v<B;v++)m[v]=arguments[v];var _;return(_=this.object3d).remove.apply(_,(0,Z.Z)(m)),this},K.getSize=function(){var B=new l.Box3().setFromObject(this.object3d);return{min:B.min,max:B.max,size:B.getSize(new l.Vector3)}},K.traverse=function(B){B(this),this.children.forEach(function(m){m.traverse(B)})},K.dispose=function(){le(this.object3d)},(0,E.Z)($,[{key:"parent",get:function(){var B=this.object3d.parent;return(B==null?void 0:B.userData.BaseObject_)||this.pencil.scene}},{key:"children",get:function(){return this.object3d.children.map(function(B){return B.userData.BaseObject_}).filter(function(B){return!!B})}}]),$}()},896:function(V,R,f){"use strict";f.d(R,{Z:function(){return T}});var j=f(438),T=function(){"use strict";function i(A){(0,j.Z)(this,i),this.guiParams={},A&&(this.guiParams=A)}var h=i.prototype;return h.showGui=function(E){var Z=this;!E||Object.keys(this.guiParams).forEach(function(l){var ne=E.addFolder(l),ee=Z.guiParams[l];Object.keys(ee).forEach(function(te){var ie=ee[te],le=ie.min,ce=ie.max,$=ie.step,K=ie.name,D=ie.paramMap,B=ie.items,m=ie.value,v=ie.target,_=te.toLowerCase().indexOf("color")>-1,M,W=typeof m=="undefined"&&v,Q=W?v():ee[te],Y=W?te:"value";B?M=ne.add(Q,Y,B):_?M=ne.addColor(Q,Y):M=ne.add(Q,Y),M=M.name(K||te),typeof le!="undefined"&&(M=M.min(le)),typeof ce!="undefined"&&(M=M.max(ce)),typeof $!="undefined"&&(M=M.step($)),M=M.onChange(function(){Z.setTargetValue(l,te,Q[Y],D)}),W&&M.listen()})})},h.setTargetValue=function(E,Z,l,ne){var ee=this.guiParams[E][Z],te=ee.onChange,ie=ee.target,le=ee.value,ce=Z.toLowerCase().indexOf("color")>-1,$=typeof le=="undefined"&&ie;if(ie&&!$){var K=ie();Array.isArray(K)||(K=[K]),K.forEach(function(D){if(!!D)if(ce)try{D[ne||Z].set(l)}catch(B){Z!=="color"&&!ne&&console.warn("".concat(Z," is not a color,set paramMap"))}else D[ne||Z]=l})}te&&te(l)},h.setTargetValueByParams=function(){var E=this;Object.keys(this.guiParams).forEach(function(Z){Object.keys(E.guiParams[Z]).forEach(function(l){var ne=E.guiParams[Z][l];typeof ne.value!="undefined"&&E.setTargetValue(Z,l,ne.value,ne.paramMap)})})},i}()},639:function(V,R,f){"use strict";f.d(R,{BaseObject:function(){return U.ZP}});var j=f(438),T=f(951),i=f(42),h=f(396),A=f(342),E=f(494),Z=f.n(E),l=f(644),ne=f(187),ee=require("deepmerge"),te=f.n(ee),ie=require("three/examples/jsm/libs/stats.module"),le=f.n(ie),ce=require("lil-gui"),$=f.n(ce),K=f(896),D={None:l.NoToneMapping,Linear:l.LinearToneMapping,Reinhard:l.ReinhardToneMapping,Cineon:l.CineonToneMapping,ACESFilmic:l.ACESFilmicToneMapping},B={antialias:!1,devicePixelRatio:window.devicePixelRatio,powerPreference:"high-performance",toneMapping:"None",toneMappingExposure:1,alpha:!1,outputEncoding:l.LinearEncoding,logarithmicDepthBuffer:!1,preserveDrawingBuffer:!1},m=function(){"use strict";function w(a){(0,j.Z)(this,w),this.options=a;var e=a.width,r=a.height,t=a.rendererParams,c=t.alpha,d=t.devicePixelRatio,o=t.antialias,x=t.powerPreference,H=t.toneMapping,F=t.toneMappingExposure,k=t.outputEncoding,I=t.logarithmicDepthBuffer,J=t.preserveDrawingBuffer,q=new l.WebGLRenderer({alpha:c,antialias:o,powerPreference:x,logarithmicDepthBuffer:I,preserveDrawingBuffer:J});q.setSize(e,r),q.setPixelRatio(d),q.autoClear=!1,q.toneMapping=D[H],q.toneMappingExposure=F,q.outputEncoding=k,this.renderer=q}var p=w.prototype;return p.setSize=function(e,r){this.renderer.setSize(e,r)},p.render=function(){var e=this.options,r=e.scene,t=e.camera;this.renderer.render(r,t)},p.setGui=function(e){var r=this,t=new K.Z({renderer:{toneMapping:{value:this.options.rendererParams.toneMapping,items:D,target:function(){return r.renderer}},toneMappingExposure:{value:this.options.rendererParams.toneMappingExposure,min:0,max:Math.pow(2,4),target:function(){return r.renderer}}}});t.showGui(e)},p.dispose=function(){var e,r,t;(e=this.renderer)===null||e===void 0||e.clear(),(r=this.renderer)===null||r===void 0||r.dispose(),(t=this.renderer)===null||t===void 0||t.renderLists.dispose()},w}(),v={fov:45,near:1,far:1e3},_=function(){"use strict";function w(a){(0,j.Z)(this,w),this.oldCameraPosition=new l.Vector3,this.oldCameraRotation=new l.Euler,this.customCamera=!1,this.options=a;var e=a.width,r=a.height,t=a.cameraParams;if(t instanceof l.Camera)this.camera=t,this.customCamera=!0;else{var c=t.fov,d=t.far,o=t.near,x=new l.PerspectiveCamera(c,e/r,o,d);x.position.set(0,0,400),x.lookAt(0,0,0),this.camera=x}}var p=w.prototype;return p.checkCameraChange=function(){var e=this.camera,r=this.oldCameraPosition.equals(e.position)&&this.oldCameraRotation.equals(e.rotation);return this.oldCameraPosition=e.position.clone(),this.oldCameraRotation=e.rotation.clone(),!r},p.setSize=function(e,r){this.camera instanceof l.PerspectiveCamera&&(this.camera.aspect=e/r),this.camera.updateProjectionMatrix()},p.setGui=function(e){var r=this,t=new K.Z({camera:{x:{min:-1e4,max:1e4,step:1,target:function(){return r.camera.position}},y:{min:-1e4,max:1e4,step:1,target:function(){return r.camera.position}},z:{min:-1e4,max:1e4,step:1,target:function(){return r.camera.position}},near:{min:0,max:1e3,step:1,target:function(){return r.camera},onChange:function(c){r.camera.updateProjectionMatrix()}},far:{min:0,max:2e4,step:1,target:function(){return r.camera},onChange:function(c){r.camera.updateProjectionMatrix()}}}});this.camera instanceof l.PerspectiveCamera&&(t.guiParams.camera.fov={min:0,max:90,step:1,target:function(){return r.camera},onChange:function(c){r.camera.updateProjectionMatrix()}}),t.showGui(e)},w}(),M=f(519),W={background:null},Q=function(){"use strict";function w(a){(0,j.Z)(this,w),this.options=a;var e=a.camera,r=a.sceneParams,t=r.background,c=new l.Scene;t&&(c.background=t),c.add(e),this.scene=c}var p=w.prototype;return p.addAxesHelper=function(){var e,r=new l.AxesHelper(100);(e=this.scene)===null||e===void 0||e.add(r)},p.dispose=function(){var e;(e=this.scene)===null||e===void 0||e.traverse(function(r){(0,M.disposeMesh)(r)})},w}(),Y=require("three/examples/jsm/controls/OrbitControls"),ae={},me=function(){"use strict";function w(a){(0,j.Z)(this,w),this.options=a;var e=a.camera,r=a.controlParams,t=a.mapControl,c=r.domElement,d=t?new Y.MapControls(e,c):new Y.OrbitControls(e,c);d.minPolarAngle=Math.PI*.15,d.maxPolarAngle=Math.PI*.85,d.enableDamping=!0,d.dampingFactor=.063,d.autoRotate=!1,d.autoRotateSpeed=-60,d.enableZoom=!0,d.zoomSpeed=.2,this.control=d}var p=w.prototype;return p.limitPan=function(e){var r=e.maxX,t=r===void 0?1/0:r,c=e.minX,d=c===void 0?-1/0:c,o=e.maxZ,x=o===void 0?1/0:o,H=e.minZ,F=H===void 0?-1/0:H,k=e.maxY,I=k===void 0?1/0:k,J=e.minY,q=J===void 0?-1/0:J,oe=this.limitPanV||new l.Vector3,se=this.control,we=this.options.camera,ge=new l.Vector3(d,q,F),xe=new l.Vector3(t,I,x);this.limitPanV=oe,oe.copy(se.target),se.target.clamp(ge,xe),oe.sub(se.target),we.position.sub(oe)},p.update=function(){this.control.update()},p.dispose=function(){this.control.dispose()},w}(),Me=f(530),be=new l.Vector3,Te=new l.Matrix4,Le=new l.Matrix4,S=new l.Vector3,P=new l.Vector3,z=function w(){"use strict";var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,j.Z)(this,w);var a=function(J,q){return S.setFromMatrixPosition(J.matrixWorld),P.setFromMatrixPosition(q.matrixWorld),S.distanceToSquared(P)},e=function(J){var q=[];return J.traverse(function(oe){oe.isCSS2DObject&&q.push(oe)}),q},r=function(J){for(var q=e(J).sort(function(xe,ve){if(xe.renderOrder!==ve.renderOrder)return ve.renderOrder-xe.renderOrder;var _e=H.objects.get(xe).distanceToCameraSquared,Pe=H.objects.get(ve).distanceToCameraSquared;return _e-Pe}),oe=q.length,se=0,we=q.length;se<we;se++){var ge=q[se].userData.zIndexFix||0;q[se].element.style.zIndex=oe-se+ge}},t=this,c,d,o,x,H={objects:new WeakMap},F=p.element!==void 0?p.element:document.createElement("div");F.style.overflow="hidden",this.domElement=F,this.getSize=function(){return{width:c,height:d}},this.render=function(I,J){I.autoUpdate===!0&&I.updateMatrixWorld(),J.parent===null&&J.updateMatrixWorld(),Te.copy(J.matrixWorldInverse),Le.multiplyMatrices(J.projectionMatrix,Te),k(I,I,J),r(I)},this.setSize=function(I,J){c=I,d=J,o=c/2,x=d/2,F.style.width="".concat(I,"px"),F.style.height="".concat(J,"px")};function k(I,J,q){if(I.isCSS2DObject){be.setFromMatrixPosition(I.matrixWorld),be.applyMatrix4(Le);var oe=I.visible===!0&&be.z>=-1&&be.z<=1&&I.layers.test(q.layers)===!0;if(I.element.style.display=oe===!0?"":"none",oe===!0){I.onBeforeRender(t,J,q);var se=I.element;se.style.transform="translate(-50%,-50%) translate(".concat(be.x*o+o,"px,").concat(-be.y*x+x,"px)"),se.parentNode!==F&&F.appendChild(se),I.onAfterRender(t,J,q)}var we={distanceToCameraSquared:a(q,I)};H.objects.set(I,we)}for(var ge=0,xe=I.children.length;ge<xe;ge++)k(I.children[ge],J,q)}},N={zIndex:"auto"},X=function(){"use strict";function w(a){(0,j.Z)(this,w),this.container=a}var p=w.prototype;return p.addRenderer=function(e,r){var t=this.container,c=t.offsetWidth,d=t.offsetHeight,o=e==="css2d"?new z:new Me.CSS3DRenderer;o.domElement.style.position="absolute",o.domElement.style.top="0",o.domElement.style.pointerEvents="none",o.domElement.style.zIndex=r.zIndex,o.setSize(c,d),t.appendChild(o.domElement),e==="css2d"?this.css2Drenderer=o:e==="css3d"&&(this.css3Drenderer=o)},p.setSize=function(e,r){var t,c;(t=this.css2Drenderer)===null||t===void 0||t.setSize(e,r),(c=this.css3Drenderer)===null||c===void 0||c.setSize(e,r)},p.render=function(e,r){var t,c;(t=this.css2Drenderer)===null||t===void 0||t.render(e,r),(c=this.css3Drenderer)===null||c===void 0||c.render(e,r)},p.dispose=function(){this.css2Drenderer=void 0,this.css3Drenderer=void 0},w}(),ue=require("three/examples/jsm/postprocessing/EffectComposer"),he=require("three/examples/jsm/postprocessing/RenderPass"),fe=require("three/examples/jsm/postprocessing/ShaderPass"),de=require("three/examples/jsm/shaders/CopyShader"),pe=require("three/examples/jsm/shaders/GammaCorrectionShader"),Oe=require("three/examples/jsm/postprocessing/SMAAPass"),Ae=require("three/examples/jsm/postprocessing/SSAARenderPass"),Ce=require("three/examples/jsm/shaders/FXAAShader"),Ne=function(){try{var w=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&w.getContext("webgl2"))}catch(p){return!1}},qe=0,Ee=1,Ze=!1,De=Ne()!==!1,He=f.p+"static/media/vertex.cc08e9108dec6da9504a.glsl",Xe=f.p+"static/media/fragment.2913fac3481dac4d4a06.glsl",ke=f(668),Ke=f(485),Fe=require("three/examples/jsm/postprocessing/Pass"),Ve=require("three/examples/jsm/shaders/LuminosityHighPassShader"),ze=function(w){"use strict";(0,ke.Z)(a,w);var p=(0,Ke.Z)(a);function a(r,t,c,d){(0,j.Z)(this,a);var o;o=p.call(this),o.strength=t!==void 0?t:1,o.radius=c,o.threshold=d,o.resolution=r!==void 0?new l.Vector2(r.x,r.y):new l.Vector2(256,256),o.clearColor=new l.Color(0,0,0);var x={minFilter:l.LinearFilter,magFilter:l.LinearFilter,format:l.RGBAFormat};o.renderTargetsHorizontal=[],o.renderTargetsVertical=[],o.nMips=5;var H=Math.round(o.resolution.x/2),F=Math.round(o.resolution.y/2);o.renderTargetBright=new l.WebGLRenderTarget(H,F,x),o.renderTargetBright.texture.name="UnrealBloomPass.bright",o.renderTargetBright.texture.generateMipmaps=!1;for(var k=0;k<o.nMips;k++){var I=new l.WebGLRenderTarget(H,F,x);I.texture.name="UnrealBloomPass.h".concat(k),I.texture.generateMipmaps=!1,o.renderTargetsHorizontal.push(I);var J=new l.WebGLRenderTarget(H,F,x);J.texture.name="UnrealBloomPass.v".concat(k),J.texture.generateMipmaps=!1,o.renderTargetsVertical.push(J),H=Math.round(H/2),F=Math.round(F/2)}Ve.LuminosityHighPassShader===void 0&&console.error("THREE.UnrealBloomPass relies on LuminosityHighPassShader");var q=Ve.LuminosityHighPassShader;o.highPassUniforms=l.UniformsUtils.clone(q.uniforms),o.highPassUniforms.luminosityThreshold.value=d,o.highPassUniforms.smoothWidth.value=.01,o.materialHighPassFilter=new l.ShaderMaterial({uniforms:o.highPassUniforms,vertexShader:q.vertexShader,fragmentShader:q.fragmentShader,defines:{}}),o.separableBlurMaterials=[];var oe=[3,5,7,9,11];H=Math.round(o.resolution.x/2),F=Math.round(o.resolution.y/2);for(var se=0;se<o.nMips;se++)o.separableBlurMaterials.push(o.getSeperableBlurMaterial(oe[se])),o.separableBlurMaterials[se].uniforms.texSize.value=new l.Vector2(H,F),H=Math.round(H/2),F=Math.round(F/2);o.compositeMaterial=o.getCompositeMaterial(o.nMips),o.compositeMaterial.uniforms.blurTexture1.value=o.renderTargetsVertical[0].texture,o.compositeMaterial.uniforms.blurTexture2.value=o.renderTargetsVertical[1].texture,o.compositeMaterial.uniforms.blurTexture3.value=o.renderTargetsVertical[2].texture,o.compositeMaterial.uniforms.blurTexture4.value=o.renderTargetsVertical[3].texture,o.compositeMaterial.uniforms.blurTexture5.value=o.renderTargetsVertical[4].texture,o.compositeMaterial.uniforms.bloomStrength.value=t,o.compositeMaterial.uniforms.bloomRadius.value=.1,o.compositeMaterial.needsUpdate=!0;var we=[1,.8,.6,.4,.2];o.compositeMaterial.uniforms.bloomFactors.value=we,o.bloomTintColors=[new l.Vector3(1,1,1),new l.Vector3(1,1,1),new l.Vector3(1,1,1),new l.Vector3(1,1,1),new l.Vector3(1,1,1)],o.compositeMaterial.uniforms.bloomTintColors.value=o.bloomTintColors,de.CopyShader===void 0&&console.error("THREE.UnrealBloomPass relies on CopyShader");var ge=de.CopyShader;return o.copyUniforms=l.UniformsUtils.clone(ge.uniforms),o.copyUniforms.opacity.value=1,o.materialCopy=new l.ShaderMaterial({uniforms:o.copyUniforms,vertexShader:ge.vertexShader,fragmentShader:ge.fragmentShader,blending:l.AdditiveBlending,depthTest:!1,depthWrite:!1,transparent:!0}),o.enabled=!0,o.needsSwap=!1,o._oldClearColor=new l.Color,o.oldClearAlpha=1,o.basic=new l.MeshBasicMaterial,o.fsQuad=new Fe.FullScreenQuad(void 0),o}var e=a.prototype;return e.dispose=function(){for(var t=0;t<this.renderTargetsHorizontal.length;t++)this.renderTargetsHorizontal[t].dispose();for(var c=0;c<this.renderTargetsVertical.length;c++)this.renderTargetsVertical[c].dispose();this.renderTargetBright.dispose()},e.setSize=function(t,c){var d=Math.round(t/2),o=Math.round(c/2);this.renderTargetBright.setSize(d,o);for(var x=0;x<this.nMips;x++)this.renderTargetsHorizontal[x].setSize(d,o),this.renderTargetsVertical[x].setSize(d,o),this.separableBlurMaterials[x].uniforms.texSize.value=new l.Vector2(d,o),d=Math.round(d/2),o=Math.round(o/2)},e.render=function(t,c,d,o,x){t.getClearColor(this._oldClearColor),this.oldClearAlpha=t.getClearAlpha();var H=t.autoClear;t.autoClear=!1,t.setClearColor(this.clearColor,0),x&&t.state.buffers.stencil.setTest(!1),this.renderToScreen&&(this.fsQuad.material=this.basic,this.basic.map=d.texture,t.setRenderTarget(null),t.clear(),this.fsQuad.render(t)),this.highPassUniforms.tDiffuse.value=d.texture,this.highPassUniforms.luminosityThreshold.value=this.threshold,this.fsQuad.material=this.materialHighPassFilter,t.setRenderTarget(this.renderTargetBright),t.clear(),this.fsQuad.render(t);for(var F=this.renderTargetBright,k=0;k<this.nMips;k++)this.fsQuad.material=this.separableBlurMaterials[k],this.separableBlurMaterials[k].uniforms.colorTexture.value=F.texture,this.separableBlurMaterials[k].uniforms.direction.value=a.BlurDirectionX,t.setRenderTarget(this.renderTargetsHorizontal[k]),t.clear(),this.fsQuad.render(t),this.separableBlurMaterials[k].uniforms.colorTexture.value=this.renderTargetsHorizontal[k].texture,this.separableBlurMaterials[k].uniforms.direction.value=a.BlurDirectionY,t.setRenderTarget(this.renderTargetsVertical[k]),t.clear(),this.fsQuad.render(t),F=this.renderTargetsVertical[k];this.fsQuad.material=this.compositeMaterial,this.compositeMaterial.uniforms.bloomStrength.value=this.strength,this.compositeMaterial.uniforms.bloomRadius.value=this.radius,this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,t.setRenderTarget(this.renderTargetsHorizontal[0]),t.clear(),this.fsQuad.render(t),this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.renderTargetsHorizontal[0].texture,x&&t.state.buffers.stencil.setTest(!0),this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(d),this.fsQuad.render(t)),t.setClearColor(this._oldClearColor,this.oldClearAlpha),t.autoClear=H},e.getSeperableBlurMaterial=function(t){return new l.ShaderMaterial({defines:{KERNEL_RADIUS:t,SIGMA:t},uniforms:{colorTexture:{value:null},texSize:{value:new l.Vector2(.5,.5)},direction:{value:new l.Vector2(.5,.5)}},vertexShader:`varying vec2 vUv;
2
+ void main() {
3
+ vUv = uv;
4
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
5
+ }`,fragmentShader:`#include <common>
6
+ varying vec2 vUv;
7
+ uniform sampler2D colorTexture;
8
+ uniform vec2 texSize;
9
+ uniform vec2 direction;
10
+ float gaussianPdf(in float x, in float sigma) {
11
+ return 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;
12
+ }
13
+ void main() {
14
+ vec2 invSize = 1.0 / texSize; float fSigma = float(SIGMA); float weightSum = gaussianPdf(0.0, fSigma); float alphaSum = 0.0; vec3 diffuseSum = texture2D( colorTexture, vUv).rgb * weightSum; for( int i = 1; i < KERNEL_RADIUS; i ++ ) { float x = float(i); float w = gaussianPdf(x, fSigma); vec2 uvOffset = direction * invSize * x; vec4 sample1 = texture2D( colorTexture, vUv + uvOffset); vec4 sample2 = texture2D( colorTexture, vUv - uvOffset); diffuseSum += (sample1.rgb + sample2.rgb) * w; alphaSum += (sample1.a + sample2.a) * w; weightSum += 2.0 * w; } gl_FragColor = vec4(diffuseSum/weightSum, alphaSum/weightSum);
15
+ }`})},e.getCompositeMaterial=function(t){return new l.ShaderMaterial({defines:{NUM_MIPS:t},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},dirtTexture:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:`varying vec2 vUv;
16
+ void main() {
17
+ vUv = uv;
18
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
19
+ }`,fragmentShader:`varying vec2 vUv;
20
+ uniform sampler2D blurTexture1;
21
+ uniform sampler2D blurTexture2;
22
+ uniform sampler2D blurTexture3;
23
+ uniform sampler2D blurTexture4;
24
+ uniform sampler2D blurTexture5;
25
+ uniform sampler2D dirtTexture;
26
+ uniform float bloomStrength;
27
+ uniform float bloomRadius;
28
+ uniform float bloomFactors[NUM_MIPS];
29
+ uniform vec3 bloomTintColors[NUM_MIPS];
30
+ float lerpBloomFactor(const in float factor) {
31
+ float mirrorFactor = 1.2 - factor;
32
+ return mix(factor, mirrorFactor, bloomRadius);
33
+ }
34
+ void main() {
35
+ gl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) +
36
+ lerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) +
37
+ lerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +
38
+ lerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +
39
+ lerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) );
40
+ }`})},a}(Fe.Pass);ze.BlurDirectionX=new l.Vector2(1,0),ze.BlurDirectionY=new l.Vector2(0,1);var Ge={threshold:.2,strength:.5,radius:0},We=new l.MeshBasicMaterial({color:"black"}),Ue=new l.SpriteMaterial({color:"#000"}),Qe=function(){"use strict";function w(a,e){(0,j.Z)(this,w),this.materials={},this.bloomLayer=new l.Layers,this.active=!0,this.composerController=a,this.options=e;var r=a.renderer,t=a.renderPass,c=a.finalComposer,d=a.getSize(),o=d.width,x=d.height,H=new ze(new l.Vector2(o,x),e.strength,e.radius,e.threshold);this.bloomPass=H;var F=new ue.EffectComposer(r);F.renderToScreen=!1,F.addPass(t),F.addPass(this.bloomPass),this.bloomComposer=F,this.bloomLayer.set(Ee);var k=new l.ShaderMaterial({uniforms:{baseTexture:{value:null},bloomTexture:{value:F.renderTarget2.texture}},vertexShader:He,fragmentShader:Xe,defines:{}}),I=new fe.ShaderPass(k,"baseTexture");I.needsSwap=!0,this.finalPass=I,c.addPass(I)}var p=w.prototype;return p.enable=function(){this.active||(this.finalPass.enabled=!0,this.bloomPass.enabled=!0,this.active=!0)},p.disable=function(){!this.active||(this.finalPass.enabled=!1,this.bloomPass.enabled=!1,this.active=!1)},p.render=function(e){if(!!this.active){var r=this,t=r.bloomComposer,c=r.bloomLayer,d=r.materials;e.traverse(function(o){var x=o;x.material&&c.test(x.layers)===!1&&(d[x.uuid]=x.material,x.material=x.isSprite?Ue:We)}),t.render(),e.traverse(function(o){var x=o;d[x.uuid]&&(x.material=d[x.uuid],delete d[x.uuid])})}},p.setSize=function(e,r){this.bloomComposer.setSize(e,r)},p.setGui=function(e){var r=this,t=new K.Z({bloom:{threshold:{value:this.options.threshold,min:0,max:1,target:function(){return r.bloomPass}},strength:{value:this.options.strength,min:0,max:10,target:function(){return r.bloomPass}},radius:{value:this.options.radius,min:0,max:2,step:.01,target:function(){return r.bloomPass}}}});t.showGui(e)},p.dispose=function(){this.bloomPass.dispose(),this.materials={}},w}(),Ye=require("three/examples/jsm/postprocessing/OutlinePass"),u={edgeStrength:3,edgeGlow:4,edgeThickness:1,pulsePeriod:0,rotate:!1,usePatternTexture:!1,visibleEdgeColor:"#5ee8e8",hiddenEdgeColor:"#190a05"},O=function(){"use strict";function w(a,e){(0,j.Z)(this,w),this.selectedObjects=[],this.active=!0,this.composerController=a,this.options=e;var r=a.scene,t=a.camera,c=a.finalComposer,d=a.getSize(),o=d.width,x=d.height,H=new Ye.OutlinePass(new l.Vector2(o,x),r,t);H.selectedObjects=this.selectedObjects,this.outlinePass=H,c.addPass(H),this.setGui()}var p=w.prototype;return p.enable=function(){this.active||(this.outlinePass.enabled=!0,this.active=!0)},p.disable=function(){!this.active||(this.outlinePass.enabled=!1,this.active=!1)},p.setGui=function(){var e=this,r=new K.Z({outline:{edgeStrength:{value:this.options.edgeStrength,min:.01,max:10,step:.01,target:function(){return e.outlinePass}},edgeGlow:{value:this.options.edgeGlow,min:0,max:10,step:.01,target:function(){return e.outlinePass}},edgeThickness:{value:this.options.edgeThickness,min:0,max:4,step:.01,target:function(){return e.outlinePass}},pulsePeriod:{value:this.options.pulsePeriod,min:0,max:4,step:.01,target:function(){return e.outlinePass}},usePatternTexture:{value:this.options.usePatternTexture,target:function(){return e.outlinePass}},visibleEdgeColor:{value:this.options.visibleEdgeColor,target:function(){return e.outlinePass}},hiddenEdgeColor:{value:this.options.hiddenEdgeColor,target:function(){return e.outlinePass}}}});r.setTargetValueByParams(),this.outlineGui=r},p.dispose=function(){this.outlinePass.dispose(),this.selectedObjects=[]},w}(),s=f(607),y=require("three/examples/jsm/postprocessing/SSRPass"),b=require("three/examples/jsm/objects/ReflectorForSSRPass"),n={maxDistance:10,selects:!0},g={width:1,height:1,clipBias:3e-4,color:8947848,useDepthTexture:!0},C=function(){"use strict";function w(a,e){(0,j.Z)(this,w),this.selectedObjects=[],this.active=!0,this.composerController=a,this.options=e;var r=a.scene,t=a.camera,c=a.renderer,d=a.finalComposer,o=a.getSize(),x=o.width,H=o.height,F=new y.SSRPass({renderer:c,scene:r,camera:t,width:x,height:H,groundReflector:null,selects:this.selectedObjects});this.ssrPass=F,d.addPass(F),this.setGui()}var p=w.prototype;return p.addGroundReflector=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=(0,i.Z)({},g,e),t=r.width,c=r.height,d=(0,s.Z)(r,["width","height"]),o=this.composerController,x=o.scene,H=o.getSize(),F=new l.PlaneGeometry(t,c),k=new b.ReflectorForSSRPass(F,(0,h.Z)((0,i.Z)({},d),{textureWidth:H.width,textureHeight:H.height}));k.material.depthWrite=!1,k.rotation.x=-Math.PI/2,k.visible=!1,x.add(k),this.ssrPass.groundReflector=this.groundReflector,this.groundReflector=k},p.removeaGroundReflector=function(){this.ssrPass.groundReflector=null,this.groundReflector=void 0},p.enable=function(){this.active||(this.ssrPass.enabled=!0,this.active=!0)},p.disable=function(){!this.active||(this.ssrPass.enabled=!1,this.active=!1)},p.setSize=function(e,r){var t=this.groundReflector;t&&(t.getRenderTarget().setSize(e,r),t.resolution.set(e,r))},p.setGui=function(){var e=this,r=new K.Z({ssr:{thickness:{value:.018,min:0,max:.1,step:1e-4,target:function(){return e.ssrPass}},infiniteThick:{value:!1,target:function(){return e.ssrPass}},fresnel:{value:!0,target:function(){return[e.ssrPass,e.groundReflector]}},distanceAttenuation:{value:!0,target:function(){return[e.ssrPass,e.groundReflector]}},selects:{value:this.options.selects,onChange:function(t){t?e.ssrPass.selects=e.selectedObjects:e.ssrPass.selects=null}},maxDistance:{value:this.options.maxDistance,min:0,max:100,step:.001,target:function(){return[e.ssrPass,e.groundReflector]}},opacity:{value:1,min:0,max:1,step:.01,target:function(){return[e.ssrPass,e.groundReflector]}}}});r.setTargetValueByParams(),this.ssrGui=r},p.dispose=function(){this.ssrPass.dispose(),this.selectedObjects=[]},w}(),L=function(){"use strict";function w(a){(0,j.Z)(this,w),this.active=!0,this.options=a;var e=a.renderer,r=a.scene,t=a.camera,c=this.createRenderTarget(),d=new ue.EffectComposer(e,c);d.setPixelRatio(e.getPixelRatio()),this.finalComposer=d,this.addRenderPasss(),this.renderer=e,this.scene=r,this.renderTarget=c,this.camera=t}var p=w.prototype;return p.createRenderTarget=function(){var e=this.options.composerParams,r=e.multisampling,t=e.type,c=e.encoding,d=this.getSize(),o={minFilter:l.LinearFilter,magFilter:l.LinearFilter,format:l.RGBAFormat,encoding:c,type:t},x;if(+l.REVISION<138&&r>0){var H=new l.WebGLMultisampleRenderTarget(d.width,d.height,o);H.samples=r,x=H}else if(+l.REVISION>=138&&r>0){var F=new l.WebGLRenderTarget(d.width,d.height,(0,h.Z)((0,i.Z)({},o),{samples:r}));x=F}else{var k=new l.WebGLRenderTarget(d.width,d.height,o);x=k}return x.texture.name="EffectComposer.rt1",x},p.addRenderPasss=function(){var e=this.options,r=e.scene,t=e.camera,c=new he.RenderPass(r,t);this.finalComposer.addPass(c),this.renderPass=c},p.addCopyPass=function(){var e=new fe.ShaderPass(de.CopyShader);this.finalComposer.addPass(e),this.copyPass=e},p.addGammaCorrectionPass=function(){var e=new fe.ShaderPass(pe.GammaCorrectionShader);this.finalComposer.addPass(e),this.gammaCorrectionPass=e},p.addFXAAPass=function(){var e=this.getSize(),r=e.width,t=e.height,c=new fe.ShaderPass(Ce.FXAAShader);this.finalComposer.addPass(c),this.fxaaPass=c,this.setFXAAPassSize(r,t)},p.addSMAAPass=function(){var e=this.getSize(),r=e.width,t=e.height,c=this.options.renderer,d=new Oe.SMAAPass(r*c.getPixelRatio(),t*c.getPixelRatio());this.finalComposer.addPass(d),this.smaaPass=d},p.addSSAAPass=function(){var e=this.options,r=e.scene,t=e.camera,c=new Ae.SSAARenderPass(r,t,0,0);c.unbiased=!0,c.sampleLevel=1,this.finalComposer.addPass(c),this.ssaaPass=c},p.addBloomPass=function(e){var r=new Qe(this,e);r.disable(),this.options.gui&&r.setGui(this.options.gui),this.bloomController=r},p.addOutlinePass=function(e){var r=new O(this,e);r.disable(),this.options.gui&&r.outlineGui.showGui(this.options.gui),this.outlineController=r},p.addSSRPass=function(e){var r=new C(this,e);r.disable(),this.options.gui&&r.ssrGui.showGui(this.options.gui),this.ssrController=r},p.getSize=function(){var e=this.options.renderer;return e.getSize(new l.Vector2)},p.enable=function(){this.active||(this.active=!0)},p.disable=function(){!this.active||(this.active=!1)},p.checkCopyPass=function(){var e=this,r=this.finalComposer.passes.some(function(t){return t!==e.renderPass&&t!==e.copyPass?t.enabled:!1});r&&this.copyPass?this.copyPass.enabled=!1:!r&&this.copyPass?this.copyPass.enabled=!0:!r&&!this.copyPass&&this.addCopyPass()},p.setSize=function(e,r){var t,c;this.finalComposer.setSize(e,r),(t=this.bloomController)===null||t===void 0||t.setSize(e,r),(c=this.ssrController)===null||c===void 0||c.setSize(e,r),this.setFXAAPassSize(e,r)},p.setFXAAPassSize=function(e,r){if(!!this.fxaaPass){var t=this.options.renderer,c=t.getPixelRatio();this.fxaaPass.material.uniforms.resolution.value.x=1/(e*c),this.fxaaPass.material.uniforms.resolution.value.y=1/(r*c)}},p.render=function(){var e;if(!!this.active){var r=this.options.scene;(e=this.bloomController)===null||e===void 0||e.render(r),this.finalComposer.render()}},p.dispose=function(){var e,r,t;(e=this.bloomController)===null||e===void 0||e.dispose(),(r=this.outlineController)===null||r===void 0||r.dispose(),(t=this.ssrController)===null||t===void 0||t.dispose(),this.finalComposer.passes.forEach(function(c){var d,o,x;(d=c.fsQuad)===null||d===void 0||d.dispose(),(o=c.fsQuad)===null||o===void 0||(x=o.material)===null||x===void 0||x.dispose()}),this.renderTarget.dispose(),this.copyPass=void 0,this.gammaCorrectionPass=void 0,this.smaaPass=void 0,this.ssaaPass=void 0,this.fxaaPass=void 0,this.bloomController=void 0,this.outlineController=void 0,this.ssrController=void 0},w}(),G=function(){"use strict";function w(a){(0,j.Z)(this,w),this.raycaster=new l.Raycaster,this.installPlugins=new Map,this.event=new ne.EventEmitter,this.clock=new l.Clock,this.options=te()(w.options,a,{isMergeableObject:M.isPlainObject});var e=this.options,r=e.container,t=e.stats,c=e.gui;if(c){var d=new($());d.open(!1),this.gui=d}if(t){var o=new(le());o.showPanel(0),o.dom.style.position="absolute",r.appendChild(o.dom),this.stats=o}this.init(),this.initComposer(),this.initCSSRenderer(),this.initControl(),this.clock.getDelta(),this.clock.getElapsedTime()}var p=w.prototype;return p.use=function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),c=1;c<r;c++)t[c-1]=arguments[c];if(this.installPlugins.has(e))console.log("plugin already installed");else if(typeof e.install=="function"){var d;(d=e).install.apply(d,[this].concat((0,A.Z)(t))),this.installPlugins.set(e,!0)}},p.init=function(){var e=this,r=this.options,t=r.container,c=r.isdev,d=r.axesHelper,o=r.renderer,x=r.scene,H=r.camera,F=this.getSize(),k=F.width,I=F.height,J=new _({isdev:c,width:k,height:I,cameraParams:H});this.gui&&J.setGui(this.gui);var q=J.camera,oe=new Q({camera:q,sceneParams:x}),se=oe.scene,we=new m({width:k,height:I,scene:se,camera:q,isdev:c,rendererParams:(0,h.Z)((0,i.Z)({},o),{outputEncoding:l.LinearEncoding,antialias:!1})});this.gui&&we.setGui(this.gui);var ge=we.renderer;d&&oe.addAxesHelper(),this.sceneController=oe,this.rendererController=we,this.cameraController=J,t.appendChild(ge.domElement);var xe=new ResizeObserver(function(ve){var _e=!0,Pe=!1,ye=void 0;try{for(var Re=ve[Symbol.iterator](),je;!(_e=(je=Re.next()).done);_e=!0){var Se=je.value,Be=Se.contentRect;e.handeleResize(Be.width,Be.height)}}catch($e){Pe=!0,ye=$e}finally{try{!_e&&Re.return!=null&&Re.return()}finally{if(Pe)throw ye}}});xe.observe(t),this.resizeObserver=xe},p.initComposer=function(){var e=this.options,r=e.bloom,t=e.outline,c=e.ssr,d=e.renderer,o=e.bloomParams,x=e.outlineParams,H=e.ssrParams,F=e.multisampling,k=d.antialias;k==="msaa"&&!De&&(k=!1,console.warn("MSAA is not supported on this browser"));var I=new L({renderer:this.renderer,scene:this.scene,camera:this.camera,gui:this.gui,composerParams:{multisampling:k==="msaa"?F:0,type:l.UnsignedByteType,encoding:d.outputEncoding}});this.composerController=I,k==="ssaa"&&I.addSSAAPass(),c&&I.addSSRPass(H),r&&I.addBloomPass(o),t&&I.addOutlinePass(x),d.outputEncoding===l.sRGBEncoding&&I.addGammaCorrectionPass(),k==="fxaa"?I.addFXAAPass():k==="smaa"&&I.addSMAAPass(),I.checkCopyPass(),this.event.on("passcheck",function(){I.checkCopyPass()})},p.initCSSRenderer=function(){var e=this.options,r=e.container,t=e.css2DRenderer,c=e.css3DRenderer,d=e.css2DRendererParams,o=e.css3DRendererParams;if(t||c){var x=new X(r);t&&x.addRenderer("css2d",d),c&&x.addRenderer("css3d",o),this.cssRendererController=x}},p.initControl=function(){var e=this.options,r=e.control,t=e.mapControl,c=e.controlParams;if(r){var d=new me({camera:this.camera,controlParams:{domElement:(c==null?void 0:c.domElement)||this.renderer.domElement},mapControl:t});this.controlController=d}},p.getSize=function(){var e=this.options.container;return{width:e.offsetWidth,height:e.offsetHeight}},p.handeleResize=function(e,r){var t=this,c=t.rendererController,d=t.cameraController,o=t.composerController,x=t.cssRendererController;d==null||d.setSize(e,r),c==null||c.setSize(e,r),o==null||o.setSize(e,r),x==null||x.setSize(e,r),this.installPlugins.forEach(function(H,F){var k;(k=F.resize)===null||k===void 0||k.call(F,{width:e,height:r})}),this.event.emit("resize",{width:e,height:r})},p.pick=function(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,c=this,d=c.raycaster,o=c.options,x=o.container,H=new l.Vector2,F=x.getBoundingClientRect();if(H.x=(e.clientX-F.left)/(F.right-F.left)*2-1,H.y=-((e.clientY-F.top)/(F.bottom-F.top))*2+1,this.camera&&this.scene){d.setFromCamera(H,this.camera);var k=d.intersectObjects(r||this.scene.children,t);if(k.length)return{object:k[0].object,intersects:k}}},p.render=function(){var e,r,t,c,d=this,o=d.renderer,x=d.scene,H=d.camera,F=d.clock;if(!(!o||!x||!H||this.options.staticRender&&!this.cameraController.checkCameraChange())){var k=F.getDelta(),I=F.getElapsedTime();if(o.clear(),Z().update(),(e=this.controlController)===null||e===void 0||e.update(),this.installPlugins.forEach(function(q,oe){var se;(se=oe.update)===null||se===void 0||se.call(oe,k,I)}),!((r=this.composerController)===null||r===void 0)&&r.active)this.composerController.render();else{var J;(J=this.rendererController)===null||J===void 0||J.render()}(t=this.cssRendererController)===null||t===void 0||t.render(x,H),(c=this.stats)===null||c===void 0||c.update(),this.event.emit("render",{delta:k,elapsed:I})}},p.start=function(){this.renderer.setAnimationLoop(this.render.bind(this)),this.event.emit("start")},p.stop=function(){this.renderer.setAnimationLoop(null),this.event.emit("stop")},p.dispose=function(){var e,r,t,c,d,o,x;this.stop(),Z().removeAll(),this.handeleResize(0,0),(e=this.resizeObserver)===null||e===void 0||e.unobserve(this.options.container),this.installPlugins.forEach(function(H,F){var k;(k=F.dispose)===null||k===void 0||k.call(F)}),(r=this.controlController)===null||r===void 0||r.dispose(),(t=this.cssRendererController)===null||t===void 0||t.dispose(),(c=this.sceneController)===null||c===void 0||c.dispose(),(d=this.composerController)===null||d===void 0||d.dispose(),(o=this.rendererController)===null||o===void 0||o.dispose(),this.controlController=void 0,this.cssRendererController=void 0,(x=this.gui)===null||x===void 0||x.destroy(),this.event.removeAllListeners(),this.installPlugins.clear()},(0,T.Z)(w,[{key:"renderer",get:function(){return this.rendererController.renderer}},{key:"control",get:function(){var e;return(e=this.controlController)===null||e===void 0?void 0:e.control}},{key:"camera",get:function(){return this.cameraController.camera}},{key:"scene",get:function(){return this.sceneController.scene}}]),w}();G.options={isdev:Ze,stats:Ze,gui:Ze,axesHelper:Ze,control:Ze,renderer:(0,h.Z)((0,i.Z)({},B),{antialias:De?"msaa":"smaa"}),staticRender:!1,multisampling:8,scene:W,camera:v,bloom:!1,bloomParams:Ge,outline:!1,outlineParams:u,css2DRenderer:!1,ssr:!1,ssrParams:n,css2DRendererParams:(0,i.Z)({},N),css3DRenderer:!1,css3DRendererParams:(0,i.Z)({},N)};var U=f(701)},695:function(V,R,f){"use strict";f.d(R,{Z:function(){return j}});function j(T){if(T.geometry&&T.geometry.dispose(),T.material){var i=Array.isArray(T.material)?T.material:[T.material];i.forEach(function(h){var A,E,Z,l,ne,ee,te,ie,le,ce,$,K,D;(A=h.map)===null||A===void 0||A.dispose(),(E=h.lightMap)===null||E===void 0||E.dispose(),(Z=h.bumpMap)===null||Z===void 0||Z.dispose(),(l=h.normalMap)===null||l===void 0||l.dispose(),(ne=h.specularMap)===null||ne===void 0||ne.dispose(),(ee=h.envMap)===null||ee===void 0||ee.dispose(),(te=h.alphaMap)===null||te===void 0||te.dispose(),(ie=h.aoMap)===null||ie===void 0||ie.dispose(),(le=h.displacementMap)===null||le===void 0||le.dispose(),(ce=h.emissiveMap)===null||ce===void 0||ce.dispose(),($=h.gradientMap)===null||$===void 0||$.dispose(),(K=h.metalnessMap)===null||K===void 0||K.dispose(),(D=h.roughnessMap)===null||D===void 0||D.dispose(),h.dispose()})}}},519:function(V,R,f){"use strict";f.d(R,{disposeMesh:function(){return h.Z},isPlainObject:function(){return Z.Z}});var j=f(666),T=f.n(j),i=null,h=f(695),A=f(644);function E($){if($.material){var K=Array.isArray($.material)?$.material:[$.material];K.forEach(function(D){var B,m;(B=D.color)===null||B===void 0||B.convertSRGBToLinear(),(m=D.emissive)===null||m===void 0||m.convertSRGBToLinear(),D.map&&(D.map.encoding=THREE.sRGBEncoding),D.emissiveMap&&(D.emissiveMap.encoding=THREE.sRGBEncoding)})}}var Z=f(738),l=f(568),ne=f(924),ee=require("idb-keyval"),te=f(484),ie=null,le=null,ce=function(){var $=(0,l.Z)(T().mark(function K(D,B){var m,v,_,M,W,Q;return T().wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return m=B.version,ae.next=4,(0,ee.get)(D);case 4:if(_=ae.sent,!(_&&_[m])){ae.next=9;break}v=_[m],ae.next=15;break;case 9:return ae.next=11,(0,te.Z)(fetch(D).then(function(me){if(me.ok)return me.blob();throw new Error}));case 11:M=ae.sent,W=M.res,Q=M.err,Q||(v=W,(0,ee.set)(D,(0,ne.Z)({},m,W)));case 15:return ae.abrupt("return",v?{url:URL.createObjectURL(v)}:{url:D});case 16:case"end":return ae.stop()}},K)}));return function(D,B){return $.apply(this,arguments)}}()},738:function(V,R,f){"use strict";f.d(R,{Z:function(){return T}});function j(i){return Object.prototype.toString.call(i)==="[object Object]"}function T(i){if(j(i)===!1)return!1;var h=i.constructor;if(h===void 0)return!0;var A=h.prototype;return!(j(A)===!1||A.hasOwnProperty("isPrototypeOf")===!1)}},282:function(V,R,f){"use strict";f.d(R,{Z:function(){return T}});var j=f(484);function T(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A={};return A.promise=new Promise(function(E,Z){A.resolve=E,A.reject=Z}),i&&(A.promise=(0,j.Z)(A.promise,h)),A}},484:function(V,R,f){"use strict";f.d(R,{Z:function(){return T}});var j=f(42);function T(i){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return i.then(function(A){return(0,j.Z)({err:null,res:A},h)}).catch(function(A){return(0,j.Z)({err:A,res:void 0},h)})}},494:function(V){"use strict";V.exports=require("@tweenjs/tween.js")},644:function(V){"use strict";V.exports=require("three")},530:function(V){"use strict";V.exports=require("three/examples/jsm/renderers/CSS3DRenderer")},943:function(V,R,f){"use strict";f.d(R,{Z:function(){return j}});function j(T,i){(i==null||i>T.length)&&(i=T.length);for(var h=0,A=new Array(i);h<i;h++)A[h]=T[h];return A}},982:function(V,R,f){"use strict";f.d(R,{Z:function(){return T}});var j=f(943);function T(i){if(Array.isArray(i))return(0,j.Z)(i)}},111:function(V,R,f){"use strict";f.d(R,{Z:function(){return j}});function j(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T}},568:function(V,R,f){"use strict";f.d(R,{Z:function(){return T}});function j(i,h,A,E,Z,l,ne){try{var ee=i[l](ne),te=ee.value}catch(ie){A(ie);return}ee.done?h(te):Promise.resolve(te).then(E,Z)}function T(i){return function(){var h=this,A=arguments;return new Promise(function(E,Z){var l=i.apply(h,A);function ne(te){j(l,E,Z,ne,ee,"next",te)}function ee(te){j(l,E,Z,ne,ee,"throw",te)}ne(void 0)})}}},438:function(V,R,f){"use strict";f.d(R,{Z:function(){return j}});function j(T,i){if(!(T instanceof i))throw new TypeError("Cannot call a class as a function")}},951:function(V,R,f){"use strict";f.d(R,{Z:function(){return T}});function j(i,h){for(var A=0;A<h.length;A++){var E=h[A];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(i,E.key,E)}}function T(i,h,A){return h&&j(i.prototype,h),A&&j(i,A),i}},485:function(V,R,f){"use strict";f.d(R,{Z:function(){return E}});function j(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(Z){return!1}}var T=f(662),i=f(111);function h(Z){return Z&&Z.constructor===Symbol?"symbol":typeof Z}function A(Z,l){return l&&(h(l)==="object"||typeof l=="function")?l:(0,i.Z)(Z)}function E(Z){var l=j();return function(){var ee=(0,T.Z)(Z),te;if(l){var ie=(0,T.Z)(this).constructor;te=Reflect.construct(ee,arguments,ie)}else te=ee.apply(this,arguments);return A(this,te)}}},924:function(V,R,f){"use strict";f.d(R,{Z:function(){return j}});function j(T,i,h){return i in T?Object.defineProperty(T,i,{value:h,enumerable:!0,configurable:!0,writable:!0}):T[i]=h,T}},662:function(V,R,f){"use strict";f.d(R,{Z:function(){return T}});function j(i){return j=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)},j(i)}function T(i){return j(i)}},668:function(V,R,f){"use strict";f.d(R,{Z:function(){return T}});var j=f(998);function T(i,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(h&&h.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),h&&(0,j.Z)(i,h)}},375:function(V,R,f){"use strict";f.d(R,{Z:function(){return j}});function j(T){if(typeof Symbol!="undefined"&&T[Symbol.iterator]!=null||T["@@iterator"]!=null)return Array.from(T)}},270:function(V,R,f){"use strict";f.d(R,{Z:function(){return j}});function j(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},42:function(V,R,f){"use strict";f.d(R,{Z:function(){return T}});var j=f(924);function T(i){for(var h=1;h<arguments.length;h++){var A=arguments[h]!=null?arguments[h]:{},E=Object.keys(A);typeof Object.getOwnPropertySymbols=="function"&&(E=E.concat(Object.getOwnPropertySymbols(A).filter(function(Z){return Object.getOwnPropertyDescriptor(A,Z).enumerable}))),E.forEach(function(Z){(0,j.Z)(i,Z,A[Z])})}return i}},396:function(V,R,f){"use strict";f.d(R,{Z:function(){return T}});function j(i,h){var A=Object.keys(i);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(i);h&&(E=E.filter(function(Z){return Object.getOwnPropertyDescriptor(i,Z).enumerable})),A.push.apply(A,E)}return A}function T(i,h){return h=h!=null?h:{},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(h)):j(Object(h)).forEach(function(A){Object.defineProperty(i,A,Object.getOwnPropertyDescriptor(h,A))}),i}},607:function(V,R,f){"use strict";f.d(R,{Z:function(){return T}});function j(i,h){if(i==null)return{};var A={},E=Object.keys(i),Z,l;for(l=0;l<E.length;l++)Z=E[l],!(h.indexOf(Z)>=0)&&(A[Z]=i[Z]);return A}function T(i,h){if(i==null)return{};var A=j(i,h),E,Z;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(i);for(Z=0;Z<l.length;Z++)E=l[Z],!(h.indexOf(E)>=0)&&(!Object.prototype.propertyIsEnumerable.call(i,E)||(A[E]=i[E]))}return A}},998:function(V,R,f){"use strict";f.d(R,{Z:function(){return T}});function j(i,h){return j=Object.setPrototypeOf||function(E,Z){return E.__proto__=Z,E},j(i,h)}function T(i,h){return j(i,h)}},342:function(V,R,f){"use strict";f.d(R,{Z:function(){return A}});var j=f(982),T=f(375),i=f(270),h=f(566);function A(E){return(0,j.Z)(E)||(0,T.Z)(E)||(0,h.Z)(E)||(0,i.Z)()}},566:function(V,R,f){"use strict";f.d(R,{Z:function(){return T}});var j=f(943);function T(i,h){if(!!i){if(typeof i=="string")return(0,j.Z)(i,h);var A=Object.prototype.toString.call(i).slice(8,-1);if(A==="Object"&&i.constructor&&(A=i.constructor.name),A==="Map"||A==="Set")return Array.from(A);if(A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return(0,j.Z)(i,h)}}}},Je={};function re(V){var R=Je[V];if(R!==void 0)return R.exports;var f=Je[V]={exports:{}};return tt[V](f,f.exports,re),f.exports}(function(){re.n=function(V){var R=V&&V.__esModule?function(){return V.default}:function(){return V};return re.d(R,{a:R}),R}})(),function(){re.d=function(V,R){for(var f in R)re.o(R,f)&&!re.o(V,f)&&Object.defineProperty(V,f,{enumerable:!0,get:R[f]})}}(),function(){re.o=function(V,R){return Object.prototype.hasOwnProperty.call(V,R)}}(),function(){re.r=function(V){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(V,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(V,"__esModule",{value:!0})}}(),function(){re.p="/"}();var Ie={};(function(){"use strict";re.r(Ie),re.d(Ie,{Conic:function(){return Ye},Image:function(){return ne},Line:function(){return be},MeshLine:function(){return _},MeshLineMaterial:function(){return Q},MeshLineRaycast:function(){return M},Node:function(){return D},Text:function(){return A},Video:function(){return $}});var V=re(438),R=re(668),f=re(42),j=re(396),T=re(485),i=re(644),h=re(701),A=function(u){"use strict";(0,R.Z)(s,u);var O=(0,T.Z)(s);function s(b){(0,V.Z)(this,s);var n;return n=O.call(this),n.width=0,n.canvas=document.createElement("canvas"),n.options=(0,f.Z)({},{scale:.5,fontSize:28,fontFamily:"system-ui,-apple-system,BlinkMacSystemFont,sans-serif",fontWeight:"normal",flipX:!1,sprite:!1,sizeAttenuation:!0},b),n}var y=s.prototype;return y.create=function(){var n=this.options,g=n.position,C=n.lookAt,L=n.sprite,G=n.text,U=n.sizeAttenuation;if(L){var w=new i.Sprite(new i.SpriteMaterial({transparent:!0,sizeAttenuation:U}));this.object3d=w}else{var p=new i.MeshBasicMaterial({side:i.DoubleSide,transparent:!0}),a=new i.PlaneGeometry(1,1,1,1);this.createMesh(a,p)}this.object3d.position.copy(g),C&&this.object3d.lookAt(C),this.setText(G)},y.setText=function(n,g){var C=(0,f.Z)((0,j.Z)((0,f.Z)({},this.options),{text:n}),g||{}),L=C.text,G=C.fontSize,U=C.fontFamily,w=C.fontWeight,p=C.flipX,a=C.scale,e=this.canvas;e.width=G*L.length*2,e.height=G;var r=e.getContext("2d");r.font="".concat(w," ").concat(G,"px/1 ").concat(U);var t=r.measureText(L).width;e.width=t,this.width=t,r=e.getContext("2d"),r.clearRect(0,0,e.width,e.height),p&&r.scale(-1,1),r.font="".concat(w," ").concat(G,"px/1 ").concat(U),r.textBaseline="middle",r.fillStyle="#ffffff",r.fillText(L,p?t*-1:0,e.height/2),r.restore();var c=new i.Texture(e);c.anisotropy=16,c.needsUpdate=!0;var d=this.object3d;d.material.map&&d.material.map.dispose(),d.material.map=c,d.material.needsUpdate=!0,d.scale.set(c.image.width*a,c.image.height*a,1)},s}(h.ZP),E=re(568),Z=re(666),l=re.n(Z),ne=function(u){"use strict";(0,R.Z)(s,u);var O=(0,T.Z)(s);function s(b){(0,V.Z)(this,s);var n;return n=O.call(this),n.options=b,n}var y=s.prototype;return y.getMaterial=function(){var n=this;return(0,E.Z)(l().mark(function g(){var C,L,G,U,w,p,a,e,r,t;return l().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return C=n.options,L=C.transparent,G=C.blending,U=C.src,w=C.depthWrite,p=C.alphaTest,a=C.sprite,e=C.sizeAttenuation,d.next=3,new i.TextureLoader().loadAsync(U);case 3:return r=d.sent,t=a?new i.SpriteMaterial({map:r,transparent:L!=null?L:!1,blending:G!=null?G:i.NormalBlending,depthWrite:w!=null?w:!0,alphaTest:p!=null?p:0,sizeAttenuation:e!=null?e:!0}):new i.MeshBasicMaterial({map:r,transparent:L!=null?L:!1,blending:G!=null?G:i.NormalBlending,depthWrite:w!=null?w:!0,alphaTest:p!=null?p:0}),d.abrupt("return",t);case 6:case"end":return d.stop()}},g)}))()},y.create=function(){var n=this;return(0,E.Z)(l().mark(function g(){var C,L,G,U,w,p,a,e;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(C=n.options,L=C.scale,G=C.position,U=C.src,w=C.cache,p=C.sprite,!(w&&!w.get(U))){t.next=7;break}return w.init(U),t.next=5,n.getMaterial();case 5:a=t.sent,w.set(U,a);case 7:if(!w){t.next=13;break}return t.next=10,w.get(U);case 10:t.t0=t.sent,t.next=16;break;case 13:return t.next=15,n.getMaterial();case 15:t.t0=t.sent;case 16:e=t.t0,n.texture=e.map,p?n.createSprite(e):n.createMesh(new i.PlaneBufferGeometry(1,1),e),L&&n.object3d.scale.set(e.map.image.width*L,e.map.image.height*L,1),G&&n.object3d.position.copy(G);case 21:case"end":return t.stop()}},g)}))()},s}(h.ZP),ee=re(662);function te(u,O){for(;!Object.prototype.hasOwnProperty.call(u,O)&&(u=(0,ee.Z)(u),u!==null););return u}function ie(u,O,s){return typeof Reflect!="undefined"&&Reflect.get?ie=Reflect.get:ie=function(b,n,g){var C=te(b,n);if(!!C){var L=Object.getOwnPropertyDescriptor(C,n);return L.get?L.get.call(g||b):L.value}},ie(u,O,s)}function le(u,O,s){return ie(u,O,s)}var ce=re(282),$=function(u){"use strict";(0,R.Z)(s,u);var O=(0,T.Z)(s);function s(b){(0,V.Z)(this,s);var n;return n=O.call(this),n.options=(0,f.Z)({},{autoPlay:!0,loop:!0},b),n}var y=s.prototype;return y.getMaterial=function(){var n=this.options,g=n.src,C=n.transparent,L=n.blending,G=n.depthWrite,U=n.format,w=n.autoPlay,p=n.loop,a=n.alphaTest,e=n.sprite,r=(0,ce.Z)(),t=document.createElement("video");return t.addEventListener("loadedmetadata",function(){var c=new i.VideoTexture(t);c.format=U!=null?U:i.RGBAFormat,c.needsUpdate=!0;var d=e?new i.SpriteMaterial({map:c,transparent:C!=null?C:!1,blending:L!=null?L:i.NormalBlending,depthWrite:G!=null?G:!0,alphaTest:a!=null?a:0}):new i.MeshBasicMaterial({map:c,transparent:C!=null?C:!1,blending:L!=null?L:i.NormalBlending,depthWrite:G!=null?G:!0,alphaTest:a!=null?a:0});r.resolve(d)},!1),t.src=g,t.muted=!0,t.autoplay=w,t.loop=p,t.preload="auto",r.promise},y.create=function(){var n=this;return(0,E.Z)(l().mark(function g(){var C,L,G,U,w,p,a,e;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(C=n.options,L=C.scale,G=C.position,U=C.src,w=C.cache,p=C.sprite,!(w&&!w.get(U))){t.next=7;break}return w.init(U),t.next=5,n.getMaterial();case 5:a=t.sent,w.set(U,a);case 7:if(!w){t.next=13;break}return t.next=10,w.get(U);case 10:t.t0=t.sent,t.next=16;break;case 13:return t.next=15,n.getMaterial();case 15:t.t0=t.sent;case 16:e=t.t0,n.video=e.map.image,p?n.createSprite(e):n.createMesh(new i.PlaneBufferGeometry(1,1),e),L&&n.object3d.scale.set(n.video.videoWidth*L,n.video.videoHeight*L,1),G&&n.object3d.position.copy(G);case 21:case"end":return t.stop()}},g)}))()},y.render=function(){var n=this.options.autoPlay;n&&this.video.play()},y.dispose=function(){this.video.pause(),this.video.src="",this.video.load(),le((0,ee.Z)(s.prototype),"dispose",this).call(this)},s}(h.ZP),K=function(u){"use strict";(0,R.Z)(s,u);var O=(0,T.Z)(s);function s(b){(0,V.Z)(this,s);var n;return n=O.call(this),n.options=(0,f.Z)({},b),n}var y=s.prototype;return y.create=function(){var n=this.options,g=n.position,C=n.children,L=n.onClick,G=n.zIndexFix,U=document.createElement("div");U.appendChild(C),this.createCSS2DObject(U),g&&this.object3d.position.copy(g),L&&U.addEventListener("click",L),G&&(this.object3d.userData.zIndexFix=G)},y.getMaterial=function(n){return(0,E.Z)(l().mark(function g(){var C,L,G,U;return l().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return C=document.createElement("canvas"),C.width=256,C.height=256,L=C.getContext("2d"),L.fillStyle="#ff0000",L.fillRect(0,0,256,256),G=new i.CanvasTexture(C),U=new i.SpriteMaterial({map:G,opacity:n?1:0,transparent:!0,alphaTest:.1,sizeAttenuation:!1}),p.abrupt("return",U);case 9:case"end":return p.stop()}},g)}))()},y.createPickObject=function(n){var g=n.show,C=g===void 0?!1:g,L=n.scale,G=L===void 0?new i.Vector3(1,1,1):L,U=n.position,w=U===void 0?new i.Vector3(0,0,0):U,p=n.cache,a=this;return(0,E.Z)(l().mark(function e(){var r,t,c,d;return l().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(r="node-create-pick-object",!(p&&!p.get(r))){x.next=7;break}return p.init(r),x.next=5,a.getMaterial(C);case 5:t=x.sent,p.set(r,t);case 7:if(!p){x.next=13;break}return x.next=10,p.get(r);case 10:x.t0=x.sent,x.next=16;break;case 13:return x.next=15,a.getMaterial(C);case 15:x.t0=x.sent;case 16:c=x.t0,d=new i.Sprite(c),d.scale.set(c.map.image.width*G.x,c.map.image.height*G.y,1),d.position.copy(w),a.add(d),a.pickObject=d;case 22:case"end":return x.stop()}},e)}))()},y.dispose=function(){var n=this.options.onClick;if(n){var g;(g=this.object3d.element)===null||g===void 0||g.removeEventListener("click",n)}le((0,ee.Z)(s.prototype),"dispose",this).call(this)},s}(h.ZP),D=K,B=re(111),m=`
41
+ `.concat(i.ShaderChunk.logdepthbuf_pars_vertex,`
42
+ `).concat(i.ShaderChunk.fog_pars_vertex,`
4
43
  attribute vec3 previous;
5
44
  attribute vec3 next;
6
45
  attribute float side;
@@ -91,13 +130,13 @@
91
130
  finalPosition.xy+=offset.xy;
92
131
 
93
132
  gl_Position=finalPosition;
94
- `).concat(c.ShaderChunk.logdepthbuf_vertex,`
133
+ `).concat(i.ShaderChunk.logdepthbuf_vertex,`
95
134
  vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );
96
- `).concat(c.ShaderChunk.fog_vertex,`
135
+ `).concat(i.ShaderChunk.fog_vertex,`
97
136
  }
98
- `),ue=`
99
- `.concat(c.ShaderChunk.fog_pars_fragment,`
100
- `).concat(c.ShaderChunk.logdepthbuf_pars_fragment,`
137
+ `),v=`
138
+ `.concat(i.ShaderChunk.fog_pars_fragment,`
139
+ `).concat(i.ShaderChunk.logdepthbuf_pars_fragment,`
101
140
 
102
141
 
103
142
  uniform sampler2D map;
@@ -117,7 +156,7 @@ varying vec4 vColor;
117
156
  varying float vCounters;
118
157
 
119
158
  void main() {
120
- `).concat(c.ShaderChunk.logdepthbuf_fragment,`
159
+ `).concat(i.ShaderChunk.logdepthbuf_fragment,`
121
160
  vec4 c = vColor;
122
161
  if( useMap == 1. ) c *= texture2D( map, vUV * repeat );
123
162
  if( useAlphaMap == 1. ) c.a *= texture2D( alphaMap, vUV * repeat ).a;
@@ -127,6 +166,6 @@ void main() {
127
166
  }
128
167
  gl_FragColor = c;
129
168
  gl_FragColor.a *= step(vCounters, visibility);
130
- `).concat(c.ShaderChunk.fog_fragment,`
169
+ `).concat(i.ShaderChunk.fog_fragment,`
131
170
  }
132
- `),I=function(e){"use strict";R(r,e);var i=B(r);function r(){A(this,r);var n;return n=i.call(this),n.isMeshLine=!0,n.type="MeshLine",n.positions=[],n.previous=[],n.next=[],n.side=[],n.width=[],n.indices_array=[],n.uvs=[],n.counters=[],n._points=[],n._geom=null,n.widthCallback=null,n.matrixWorld=new c.Matrix4,Object.defineProperties(k(n),{geometry:{enumerable:!0,get:function(){return this}},geom:{enumerable:!0,get:function(){return this._geom},set:function(t){this.setGeometry(t,this.widthCallback)}},points:{enumerable:!0,get:function(){return this._points},set:function(t){this.setPoints(t,this.widthCallback)}}}),n}return r}(c.BufferGeometry);I.prototype.setMatrixWorld=function(e){this.matrixWorld=e},I.prototype.setGeometry=function(e,i){this._geometry=e,this.setPoints(e.getAttribute("position").array,i)},I.prototype.setPoints=function(e,i){if(!(e instanceof Float32Array)&&!(e instanceof Array)){console.error("ERROR: The BufferArray of points is not instancied correctly.");return}if(this._points=e,this.widthCallback=i,this.positions=[],this.counters=[],e.length&&e[0]instanceof c.Vector3)for(var r=0;r<e.length;r++){var n=e[r],a=r/e.length;this.positions.push(n.x,n.y,n.z),this.positions.push(n.x,n.y,n.z),this.counters.push(a),this.counters.push(a)}else for(var r=0;r<e.length;r+=3){var a=r/e.length;this.positions.push(e[r],e[r+1],e[r+2]),this.positions.push(e[r],e[r+1],e[r+2]),this.counters.push(a),this.counters.push(a)}this.process()};function be(e,i){var r=new c.Matrix4,n=new c.Ray,a=new c.Sphere,t=new c.Vector3,u=this.geometry;if(u.boundingSphere||u.computeBoundingSphere(),a.copy(u.boundingSphere),a.applyMatrix4(this.matrixWorld),e.ray.intersectSphere(a,t)!==!1){r.copy(this.matrixWorld).invert(),n.copy(e.ray).applyMatrix4(r);var h=new c.Vector3,p=new c.Vector3,d=new c.Vector3,g=this instanceof c.LineSegments?2:1,b=u.index,w=u.attributes;if(b!==null)for(var O=b.array,x=w.position.array,C=w.width.array,f=0,U=O.length-1;f<U;f+=g){var G=O[f],we=O[f+1];h.fromArray(x,G*3),p.fromArray(x,we*3);var X=C[Math.floor(f/3)]!==void 0?C[Math.floor(f/3)]:1,Se=e.params.Line.threshold+this.material.lineWidth*X/2,je=Se*Se,ke=n.distanceSqToSegment(h,p,t,d);if(!(ke>je)){t.applyMatrix4(this.matrixWorld);var ye=e.ray.origin.distanceTo(t);ye<e.near||ye>e.far||(i.push({distance:ye,point:d.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}),f=U)}}}}I.prototype.raycast=be,I.prototype.compareV3=function(e,i){var r=e*6,n=i*6;return this.positions[r]===this.positions[n]&&this.positions[r+1]===this.positions[n+1]&&this.positions[r+2]===this.positions[n+2]},I.prototype.copyV3=function(e){var i=e*6;return[this.positions[i],this.positions[i+1],this.positions[i+2]]},I.prototype.process=function(){var e=this.positions.length/6;this.previous=[],this.next=[],this.side=[],this.width=[],this.indices_array=[],this.uvs=[];var i,r;this.compareV3(0,e-1)?r=this.copyV3(e-2):r=this.copyV3(0),this.previous.push(r[0],r[1],r[2]),this.previous.push(r[0],r[1],r[2]);for(var n=0;n<e;n++){if(this.side.push(1),this.side.push(-1),this.widthCallback?i=this.widthCallback(n/(e-1)):i=1,this.width.push(i),this.width.push(i),this.uvs.push(n/(e-1),0),this.uvs.push(n/(e-1),1),n<e-1){r=this.copyV3(n),this.previous.push(r[0],r[1],r[2]),this.previous.push(r[0],r[1],r[2]);var a=n*2;this.indices_array.push(a,a+1,a+2),this.indices_array.push(a+2,a+1,a+3)}n>0&&(r=this.copyV3(n),this.next.push(r[0],r[1],r[2]),this.next.push(r[0],r[1],r[2]))}this.compareV3(e-1,0)?r=this.copyV3(1):r=this.copyV3(e-1),this.next.push(r[0],r[1],r[2]),this.next.push(r[0],r[1],r[2]),!this._attributes||this._attributes.position.count!==this.positions.length?this._attributes={position:new c.BufferAttribute(new Float32Array(this.positions),3),previous:new c.BufferAttribute(new Float32Array(this.previous),3),next:new c.BufferAttribute(new Float32Array(this.next),3),side:new c.BufferAttribute(new Float32Array(this.side),1),width:new c.BufferAttribute(new Float32Array(this.width),1),uv:new c.BufferAttribute(new Float32Array(this.uvs),2),index:new c.BufferAttribute(new Uint16Array(this.indices_array),1),counters:new c.BufferAttribute(new Float32Array(this.counters),1)}:(this._attributes.position.copyArray(new Float32Array(this.positions)),this._attributes.position.needsUpdate=!0,this._attributes.previous.copyArray(new Float32Array(this.previous)),this._attributes.previous.needsUpdate=!0,this._attributes.next.copyArray(new Float32Array(this.next)),this._attributes.next.needsUpdate=!0,this._attributes.side.copyArray(new Float32Array(this.side)),this._attributes.side.needsUpdate=!0,this._attributes.width.copyArray(new Float32Array(this.width)),this._attributes.width.needsUpdate=!0,this._attributes.uv.copyArray(new Float32Array(this.uvs)),this._attributes.uv.needsUpdate=!0,this._attributes.index.copyArray(new Uint16Array(this.indices_array)),this._attributes.index.needsUpdate=!0),this.setAttribute("position",this._attributes.position),this.setAttribute("previous",this._attributes.previous),this.setAttribute("next",this._attributes.next),this.setAttribute("side",this._attributes.side),this.setAttribute("width",this._attributes.width),this.setAttribute("uv",this._attributes.uv),this.setAttribute("counters",this._attributes.counters),this.setIndex(this._attributes.index),this.computeBoundingSphere(),this.computeBoundingBox()};function de(e,i,r,n,a){var t;if(e=e.subarray||e.slice?e:e.buffer,r=r.subarray||r.slice?r:r.buffer,e=i?e.subarray?e.subarray(i,a&&i+a):e.slice(i,a&&i+a):e,r.set)r.set(e,n);else for(t=0;t<e.length;t++)r[t+n]=e[t];return r}I.prototype.advance=function(e){var i=this._attributes.position.array,r=this._attributes.previous.array,n=this._attributes.next.array,a=i.length;de(i,0,r,0,a),de(i,6,i,0,a-6),i[a-6]=e.x,i[a-5]=e.y,i[a-4]=e.z,i[a-3]=e.x,i[a-2]=e.y,i[a-1]=e.z,de(i,6,n,0,a-6),n[a-6]=e.x,n[a-5]=e.y,n[a-4]=e.z,n[a-3]=e.x,n[a-2]=e.y,n[a-1]=e.z,this._attributes.position.needsUpdate=!0,this._attributes.previous.needsUpdate=!0,this._attributes.next.needsUpdate=!0},c.ShaderChunk.meshline_vert=he,c.ShaderChunk.meshline_frag=ue;var me=function(e){"use strict";R(r,e);var i=B(r);function r(n){A(this,r);var a;return a=i.call(this,{uniforms:Object.assign({},c.UniformsLib.fog,{lineWidth:{value:1},map:{value:null},useMap:{value:0},alphaMap:{value:null},useAlphaMap:{value:0},color:{value:new c.Color(16777215)},opacity:{value:1},resolution:{value:new c.Vector2(1,1)},sizeAttenuation:{value:1},dashArray:{value:0},dashOffset:{value:0},dashRatio:{value:.5},useDash:{value:0},visibility:{value:1},alphaTest:{value:0},repeat:{value:new c.Vector2(1,1)},offset:{value:new c.Vector2(1,1)},lineLightAnimation:{value:1},time:{value:0},size:{value:300},speed:{value:.3},lightWidth:{value:.1},uCenter:{value:new c.Vector2(0,0)},lightColor:{value:new c.Color(16777215)}}),vertexShader:c.ShaderChunk.meshline_vert,fragmentShader:c.ShaderChunk.meshline_frag}),a.isMeshLineMaterial=!0,a.type="MeshLineMaterial",Object.defineProperties(k(a),{lineWidth:{enumerable:!0,get:function(){return this.uniforms.lineWidth.value},set:function(u){this.uniforms.lineWidth.value=u}},lineLightAnimation:{enumerable:!0,get:function(){return this.uniforms.lineLightAnimation.value},set:function(u){this.uniforms.lineLightAnimation.value=u}},map:{enumerable:!0,get:function(){return this.uniforms.map.value},set:function(u){this.uniforms.map.value=u}},useMap:{enumerable:!0,get:function(){return this.uniforms.useMap.value},set:function(u){this.uniforms.useMap.value=u}},alphaMap:{enumerable:!0,get:function(){return this.uniforms.alphaMap.value},set:function(u){this.uniforms.alphaMap.value=u}},useAlphaMap:{enumerable:!0,get:function(){return this.uniforms.useAlphaMap.value},set:function(u){this.uniforms.useAlphaMap.value=u}},color:{enumerable:!0,get:function(){return this.uniforms.color.value},set:function(u){this.uniforms.color.value=u}},lightColor:{enumerable:!0,get:function(){return this.uniforms.lightColor.value},set:function(u){this.uniforms.lightColor.value=u}},time:{enumerable:!0,get:function(){return this.uniforms.time.value},set:function(u){this.uniforms.time.value=u}},uCenter:{enumerable:!0,get:function(){return this.uniforms.uCenter.value},set:function(u){this.uniforms.uCenter.value=u}},size:{enumerable:!0,get:function(){return this.uniforms.size.value},set:function(u){this.uniforms.size.value=u}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(u){this.uniforms.opacity.value=u}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(u){this.uniforms.resolution.value.copy(u)}},sizeAttenuation:{enumerable:!0,get:function(){return this.uniforms.sizeAttenuation.value},set:function(u){this.uniforms.sizeAttenuation.value=u}},dashArray:{enumerable:!0,get:function(){return this.uniforms.dashArray.value},set:function(u){this.uniforms.dashArray.value=u,this.useDash=u!==0?1:0}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(u){this.uniforms.dashOffset.value=u}},dashRatio:{enumerable:!0,get:function(){return this.uniforms.dashRatio.value},set:function(u){this.uniforms.dashRatio.value=u}},useDash:{enumerable:!0,get:function(){return this.uniforms.useDash.value},set:function(u){this.uniforms.useDash.value=u}},visibility:{enumerable:!0,get:function(){return this.uniforms.visibility.value},set:function(u){this.uniforms.visibility.value=u}},alphaTest:{enumerable:!0,get:function(){return this.uniforms.alphaTest.value},set:function(u){this.uniforms.alphaTest.value=u}},repeat:{enumerable:!0,get:function(){return this.uniforms.repeat.value},set:function(u){this.uniforms.repeat.value.copy(u)}}}),a.setValues(n),a}return r}(c.ShaderMaterial);me.prototype.copy=function(e){return c.ShaderMaterial.prototype.copy.call(this,e),this.lineWidth=e.lineWidth,this.map=e.map,this.useMap=e.useMap,this.alphaMap=e.alphaMap,this.useAlphaMap=e.useAlphaMap,this.color.copy(e.color),this.opacity=e.opacity,this.resolution.copy(e.resolution),this.sizeAttenuation=e.sizeAttenuation,this.dashArray.copy(e.dashArray),this.dashOffset.copy(e.dashOffset),this.dashRatio.copy(e.dashRatio),this.useDash=e.useDash,this.visibility=e.visibility,this.alphaTest=e.alphaTest,this.repeat.copy(e.repeat),this};function xe(e,i){if(e==null)return{};var r={},n=Object.keys(e),a,t;for(t=0;t<n.length;t++)a=n[t],!(i.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Me(e,i){if(e==null)return{};var r=xe(e,i),n,a;if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);for(a=0;a<t.length;a++)n=t[a],!(i.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}var Pe=require("@tweenjs/tween.js"),_e=Z.n(Pe),Oe={nodes:[],color:new c.Color("red"),lineWidth:3,sizeAttenuation:0},Ce=function(e){"use strict";R(r,e);var i=B(r);function r(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};A(this,r);var t;return t=i.call(this),t.geometry=new c.BufferGeometry,t.meshline=new I,t.options=(0,S.Z)({},Oe,a),t}var n=r.prototype;return n.create=function(){var t=this.options,u=t.nodes,h=t.duration,p=t.delay,d=t.onComplete,g=t.setPointWidth,b=Me(t,["nodes","duration","delay","onComplete","setPointWidth"]),w=this.pencil.getSize(),O=w.width,x=w.height;delete b.key,this.geometry.setFromPoints(u),this.meshline.setGeometry(this.geometry,g);var C=new me(_((0,S.Z)({},b),{resolution:new c.Vector2(O,x)}));this.material=C,this.createMesh(this.meshline,C)},n.resize=function(t,u){this.material.uniforms.resolution.value.set(t,u)},n.animate=function(){var t=this.options,u=t.duration,h=t.delay,p=t.onComplete,d=this.material.uniforms.offset,g=new(_e()).Tween(d.value).to({x:0},u!=null?u:1e3).delay(h!=null?h:0).repeat(1/0);p&&g.onComplete(p),g.start(),this.tween=g},n.dispose=function(){N(L(r.prototype),"dispose",this).call(this),this.tween&&_e().remove(this.tween)},r}(ae)})(),module.exports=ve})();
171
+ `),_=function(u){"use strict";(0,R.Z)(s,u);var O=(0,T.Z)(s);function s(){(0,V.Z)(this,s);var y;return y=O.call(this),y.isMeshLine=!0,y.type="MeshLine",y.positions=[],y.previous=[],y.next=[],y.side=[],y.width=[],y.indices_array=[],y.uvs=[],y.counters=[],y._points=[],y._geom=null,y.widthCallback=null,y.matrixWorld=new i.Matrix4,Object.defineProperties((0,B.Z)(y),{geometry:{enumerable:!0,get:function(){return this}},geom:{enumerable:!0,get:function(){return this._geom},set:function(n){this.setGeometry(n,this.widthCallback)}},points:{enumerable:!0,get:function(){return this._points},set:function(n){this.setPoints(n,this.widthCallback)}}}),y}return s}(i.BufferGeometry);_.prototype.setMatrixWorld=function(u){this.matrixWorld=u},_.prototype.setGeometry=function(u,O){this._geometry=u,this.setPoints(u.getAttribute("position").array,O)},_.prototype.setPoints=function(u,O){if(!(u instanceof Float32Array)&&!(u instanceof Array)){console.error("ERROR: The BufferArray of points is not instancied correctly.");return}if(this._points=u,this.widthCallback=O,this.positions=[],this.counters=[],u.length&&u[0]instanceof i.Vector3)for(var s=0;s<u.length;s++){var y=u[s],b=s/u.length;this.positions.push(y.x,y.y,y.z),this.positions.push(y.x,y.y,y.z),this.counters.push(b),this.counters.push(b)}else for(var s=0;s<u.length;s+=3){var b=s/u.length;this.positions.push(u[s],u[s+1],u[s+2]),this.positions.push(u[s],u[s+1],u[s+2]),this.counters.push(b),this.counters.push(b)}this.process()};function M(u,O){var s=new i.Matrix4,y=new i.Ray,b=new i.Sphere,n=new i.Vector3,g=this.geometry;if(g.boundingSphere||g.computeBoundingSphere(),b.copy(g.boundingSphere),b.applyMatrix4(this.matrixWorld),u.ray.intersectSphere(b,n)!==!1){s.copy(this.matrixWorld).invert(),y.copy(u.ray).applyMatrix4(s);var C=new i.Vector3,L=new i.Vector3,G=new i.Vector3,U=this instanceof i.LineSegments?2:1,w=g.index,p=g.attributes;if(w!==null)for(var a=w.array,e=p.position.array,r=p.width.array,t=0,c=a.length-1;t<c;t+=U){var d=a[t],o=a[t+1];C.fromArray(e,d*3),L.fromArray(e,o*3);var x=r[Math.floor(t/3)]!==void 0?r[Math.floor(t/3)]:1,H=u.params.Line.threshold+this.material.lineWidth*x/2,F=H*H,k=y.distanceSqToSegment(C,L,n,G);if(!(k>F)){n.applyMatrix4(this.matrixWorld);var I=u.ray.origin.distanceTo(n);I<u.near||I>u.far||(O.push({distance:I,point:G.clone().applyMatrix4(this.matrixWorld),index:t,face:null,faceIndex:null,object:this}),t=c)}}}}_.prototype.raycast=M,_.prototype.compareV3=function(u,O){var s=u*6,y=O*6;return this.positions[s]===this.positions[y]&&this.positions[s+1]===this.positions[y+1]&&this.positions[s+2]===this.positions[y+2]},_.prototype.copyV3=function(u){var O=u*6;return[this.positions[O],this.positions[O+1],this.positions[O+2]]},_.prototype.process=function(){var u=this.positions.length/6;this.previous=[],this.next=[],this.side=[],this.width=[],this.indices_array=[],this.uvs=[];var O,s;this.compareV3(0,u-1)?s=this.copyV3(u-2):s=this.copyV3(0),this.previous.push(s[0],s[1],s[2]),this.previous.push(s[0],s[1],s[2]);for(var y=0;y<u;y++){if(this.side.push(1),this.side.push(-1),this.widthCallback?O=this.widthCallback(y/(u-1)):O=1,this.width.push(O),this.width.push(O),this.uvs.push(y/(u-1),0),this.uvs.push(y/(u-1),1),y<u-1){s=this.copyV3(y),this.previous.push(s[0],s[1],s[2]),this.previous.push(s[0],s[1],s[2]);var b=y*2;this.indices_array.push(b,b+1,b+2),this.indices_array.push(b+2,b+1,b+3)}y>0&&(s=this.copyV3(y),this.next.push(s[0],s[1],s[2]),this.next.push(s[0],s[1],s[2]))}this.compareV3(u-1,0)?s=this.copyV3(1):s=this.copyV3(u-1),this.next.push(s[0],s[1],s[2]),this.next.push(s[0],s[1],s[2]),!this._attributes||this._attributes.position.count!==this.positions.length?this._attributes={position:new i.BufferAttribute(new Float32Array(this.positions),3),previous:new i.BufferAttribute(new Float32Array(this.previous),3),next:new i.BufferAttribute(new Float32Array(this.next),3),side:new i.BufferAttribute(new Float32Array(this.side),1),width:new i.BufferAttribute(new Float32Array(this.width),1),uv:new i.BufferAttribute(new Float32Array(this.uvs),2),index:new i.BufferAttribute(new Uint16Array(this.indices_array),1),counters:new i.BufferAttribute(new Float32Array(this.counters),1)}:(this._attributes.position.copyArray(new Float32Array(this.positions)),this._attributes.position.needsUpdate=!0,this._attributes.previous.copyArray(new Float32Array(this.previous)),this._attributes.previous.needsUpdate=!0,this._attributes.next.copyArray(new Float32Array(this.next)),this._attributes.next.needsUpdate=!0,this._attributes.side.copyArray(new Float32Array(this.side)),this._attributes.side.needsUpdate=!0,this._attributes.width.copyArray(new Float32Array(this.width)),this._attributes.width.needsUpdate=!0,this._attributes.uv.copyArray(new Float32Array(this.uvs)),this._attributes.uv.needsUpdate=!0,this._attributes.index.copyArray(new Uint16Array(this.indices_array)),this._attributes.index.needsUpdate=!0),this.setAttribute("position",this._attributes.position),this.setAttribute("previous",this._attributes.previous),this.setAttribute("next",this._attributes.next),this.setAttribute("side",this._attributes.side),this.setAttribute("width",this._attributes.width),this.setAttribute("uv",this._attributes.uv),this.setAttribute("counters",this._attributes.counters),this.setIndex(this._attributes.index),this.computeBoundingSphere(),this.computeBoundingBox()};function W(u,O,s,y,b){var n;if(u=u.subarray||u.slice?u:u.buffer,s=s.subarray||s.slice?s:s.buffer,u=O?u.subarray?u.subarray(O,b&&O+b):u.slice(O,b&&O+b):u,s.set)s.set(u,y);else for(n=0;n<u.length;n++)s[n+y]=u[n];return s}_.prototype.advance=function(u){var O=this._attributes.position.array,s=this._attributes.previous.array,y=this._attributes.next.array,b=O.length;W(O,0,s,0,b),W(O,6,O,0,b-6),O[b-6]=u.x,O[b-5]=u.y,O[b-4]=u.z,O[b-3]=u.x,O[b-2]=u.y,O[b-1]=u.z,W(O,6,y,0,b-6),y[b-6]=u.x,y[b-5]=u.y,y[b-4]=u.z,y[b-3]=u.x,y[b-2]=u.y,y[b-1]=u.z,this._attributes.position.needsUpdate=!0,this._attributes.previous.needsUpdate=!0,this._attributes.next.needsUpdate=!0},i.ShaderChunk.meshline_vert=m,i.ShaderChunk.meshline_frag=v;var Q=function(u){"use strict";(0,R.Z)(s,u);var O=(0,T.Z)(s);function s(y){(0,V.Z)(this,s);var b;return b=O.call(this,{uniforms:Object.assign({},i.UniformsLib.fog,{lineWidth:{value:1},map:{value:null},useMap:{value:0},alphaMap:{value:null},useAlphaMap:{value:0},color:{value:new i.Color(16777215)},opacity:{value:1},resolution:{value:new i.Vector2(1,1)},sizeAttenuation:{value:1},dashArray:{value:0},dashOffset:{value:0},dashRatio:{value:.5},useDash:{value:0},visibility:{value:1},alphaTest:{value:0},repeat:{value:new i.Vector2(1,1)},offset:{value:new i.Vector2(1,1)},lineLightAnimation:{value:1},time:{value:0},size:{value:300},speed:{value:.3},lightWidth:{value:.1},uCenter:{value:new i.Vector2(0,0)},lightColor:{value:new i.Color(16777215)}}),vertexShader:i.ShaderChunk.meshline_vert,fragmentShader:i.ShaderChunk.meshline_frag}),b.isMeshLineMaterial=!0,b.type="MeshLineMaterial",Object.defineProperties((0,B.Z)(b),{lineWidth:{enumerable:!0,get:function(){return this.uniforms.lineWidth.value},set:function(g){this.uniforms.lineWidth.value=g}},lineLightAnimation:{enumerable:!0,get:function(){return this.uniforms.lineLightAnimation.value},set:function(g){this.uniforms.lineLightAnimation.value=g}},map:{enumerable:!0,get:function(){return this.uniforms.map.value},set:function(g){this.uniforms.map.value=g}},useMap:{enumerable:!0,get:function(){return this.uniforms.useMap.value},set:function(g){this.uniforms.useMap.value=g}},alphaMap:{enumerable:!0,get:function(){return this.uniforms.alphaMap.value},set:function(g){this.uniforms.alphaMap.value=g}},useAlphaMap:{enumerable:!0,get:function(){return this.uniforms.useAlphaMap.value},set:function(g){this.uniforms.useAlphaMap.value=g}},color:{enumerable:!0,get:function(){return this.uniforms.color.value},set:function(g){this.uniforms.color.value=g}},lightColor:{enumerable:!0,get:function(){return this.uniforms.lightColor.value},set:function(g){this.uniforms.lightColor.value=g}},time:{enumerable:!0,get:function(){return this.uniforms.time.value},set:function(g){this.uniforms.time.value=g}},uCenter:{enumerable:!0,get:function(){return this.uniforms.uCenter.value},set:function(g){this.uniforms.uCenter.value=g}},size:{enumerable:!0,get:function(){return this.uniforms.size.value},set:function(g){this.uniforms.size.value=g}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(g){this.uniforms.opacity.value=g}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(g){this.uniforms.resolution.value.copy(g)}},sizeAttenuation:{enumerable:!0,get:function(){return this.uniforms.sizeAttenuation.value},set:function(g){this.uniforms.sizeAttenuation.value=g}},dashArray:{enumerable:!0,get:function(){return this.uniforms.dashArray.value},set:function(g){this.uniforms.dashArray.value=g,this.useDash=g!==0?1:0}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(g){this.uniforms.dashOffset.value=g}},dashRatio:{enumerable:!0,get:function(){return this.uniforms.dashRatio.value},set:function(g){this.uniforms.dashRatio.value=g}},useDash:{enumerable:!0,get:function(){return this.uniforms.useDash.value},set:function(g){this.uniforms.useDash.value=g}},visibility:{enumerable:!0,get:function(){return this.uniforms.visibility.value},set:function(g){this.uniforms.visibility.value=g}},alphaTest:{enumerable:!0,get:function(){return this.uniforms.alphaTest.value},set:function(g){this.uniforms.alphaTest.value=g}},repeat:{enumerable:!0,get:function(){return this.uniforms.repeat.value},set:function(g){this.uniforms.repeat.value.copy(g)}}}),b.setValues(y),b}return s}(i.ShaderMaterial);Q.prototype.copy=function(u){return i.ShaderMaterial.prototype.copy.call(this,u),this.lineWidth=u.lineWidth,this.map=u.map,this.useMap=u.useMap,this.alphaMap=u.alphaMap,this.useAlphaMap=u.useAlphaMap,this.color.copy(u.color),this.opacity=u.opacity,this.resolution.copy(u.resolution),this.sizeAttenuation=u.sizeAttenuation,this.dashArray.copy(u.dashArray),this.dashOffset.copy(u.dashOffset),this.dashRatio.copy(u.dashRatio),this.useDash=u.useDash,this.visibility=u.visibility,this.alphaTest=u.alphaTest,this.repeat.copy(u.repeat),this};var Y=re(607),ae=re(494),me=re.n(ae),Me={nodes:[],color:new i.Color("red"),lineWidth:3,sizeAttenuation:0},be=function(u){"use strict";(0,R.Z)(s,u);var O=(0,T.Z)(s);function s(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,V.Z)(this,s);var n;return n=O.call(this),n.geometry=new i.BufferGeometry,n.meshline=new _,n.options=(0,f.Z)({},Me,b),n}var y=s.prototype;return y.create=function(){var n=this.options,g=n.nodes,C=n.duration,L=n.delay,G=n.onComplete,U=n.setPointWidth,w=(0,Y.Z)(n,["nodes","duration","delay","onComplete","setPointWidth"]),p=this.pencil.getSize(),a=p.width,e=p.height;delete w.key,this.geometry.setFromPoints(g),this.meshline.setGeometry(this.geometry,U);var r=new Q((0,j.Z)((0,f.Z)({},w),{resolution:new i.Vector2(a,e)}));this.material=r,this.createMesh(this.meshline,r)},y.resize=function(n,g){this.material.uniforms.resolution.value.set(n,g)},y.animate=function(){var n=this.options,g=n.duration,C=n.delay,L=n.onComplete,G=this.material.uniforms.offset,U=new(me()).Tween(G.value).to({x:0},g!=null?g:1e3).delay(C!=null?C:0).repeat(1/0);L&&U.onComplete(L),U.start(),this.tween=U},y.dispose=function(){le((0,ee.Z)(s.prototype),"dispose",this).call(this),this.tween&&me().remove(this.tween)},s}(h.ZP),Te=re(639);function Le(u){if(Array.isArray(u))return u}var S=re(375);function P(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var z=re(566);function N(u,O){return Le(u)||(0,S.Z)(u,O)||(0,z.Z)(u,O)||P()}var X=require("d3-array"),ue=require("earcut"),he=re.n(ue),fe=require("@turf/boolean-clockwise"),de=re.n(fe);function pe(u,O){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,y=(90-O)*Math.PI/180,b=(90-u)*Math.PI/180;return[s*Math.sin(y)*Math.cos(b),s*Math.cos(y),s*Math.sin(y)*Math.sin(b)]}var Oe=re(342),Ae=require("delaunator"),Ce=re.n(Ae),Ne=require("@turf/boolean-point-in-polygon"),qe=re.n(Ne),Ee=require("d3-geo"),Ze=require("d3-geo-voronoi"),De=require("d3-scale");function He(u,O){return u.map(function(s){var y=[],b;return s.forEach(function(n){if(b){var g=(0,Ee.geoDistance)(n,b)*180/Math.PI;if(g>O)for(var C=(0,Ee.geoInterpolate)(b,n),L=1/Math.ceil(g/O),G=L;G<1;)y.push(C(G)),G+=L}y.push(b=n)}),y})}function Xe(u){for(var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=O.minLng,y=O.maxLng,b=O.minLat,n=O.maxLat,g=Math.round(Math.pow(360/u,2)/Math.PI),C=(1+Math.sqrt(5))/2,L=function(t){return t/C*360%360-180},G=function(t){return Math.acos(2*t/g-1)/Math.PI*180-90},U=function(t){return g*(Math.cos((t+90)*Math.PI/180)+1)/2},w=[n!==void 0?Math.ceil(U(n)):0,b!==void 0?Math.floor(U(b)):g-1],p=s===void 0&&y===void 0?function(){return!0}:s===void 0?function(t){return t<=y}:y===void 0?function(t){return t>=s}:y>=s?function(t){return t>=s&&t<=y}:function(t){return t>=s||t<=y},a=[],e=w[0];e<=w[1];e++){var r=L(e);p(r)&&a.push([r,G(e)])}return a}function ke(u,O){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return s?(0,Ee.geoContains)(O,u):qe()(u,O)}function Ke(u,O){var s={type:"Polygon",coordinates:u},y=N((0,Ee.geoBounds)(s),2),b=N(y[0],2),n=b[0],g=b[1],C=N(y[1],2),L=C[0],G=C[1];if(Math.min(Math.abs(L-n),Math.abs(G-g))<O)return[];var U=n>L||G>=89||g<=-89;return Xe(O,{minLng:n,maxLng:L,minLat:g,maxLat:G}).filter(function(w){return ke(w,s,U)})}function Fe(u){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=O.resolution,y=s===void 0?1/0:s,b=He(u,y),n=(0,X.merge)(b),g=Ke(u,y),C=(0,Oe.Z)(n).concat((0,Oe.Z)(g)),L={type:"Polygon",coordinates:u},G=N((0,Ee.geoBounds)(L),2),U=N(G[0],2),w=U[0],p=U[1],a=N(G[1],2),e=a[0],r=a[1],t=w>e||r>=89||p<=-89,c=[];if(t){var d=(0,Ze.geoVoronoi)(C).triangles(),o=new Map(C.map(function(ve,_e){var Pe=N(ve,2),ye=Pe[0],Re=Pe[1];return["".concat(ye,"-").concat(Re),_e]}));d.features.forEach(function(ve){var _e,Pe=ve.geometry.coordinates[0].slice(0,3).reverse(),ye=[];if(Pe.forEach(function(je){var Se=N(je,2),Be=Se[0],$e=Se[1],et="".concat(Be,"-").concat($e);o.has(et)&&ye.push(o.get(et))}),ye.length===3){if(ye.some(function(je){return je<n.length})){var Re=ve.properties.circumcenter;if(!ke(Re,L,t))return}(_e=c).push.apply(_e,(0,Oe.Z)(ye))}})}else if(g.length)for(var I=function(ve,_e){var Pe,ye=[2,1,0].map(function(Se){return J.triangles[ve+Se]}),Re=ye.map(function(Se){return C[Se]});if(ye.some(function(Se){return Se<n.length})){var je=[0,1].map(function(Se){return(0,X.mean)(Re,function(Be){return Be[Se]})});if(!ke(je,L,t))return"continue"}(Pe=c).push.apply(Pe,(0,Oe.Z)(ye))},J=Ce().from(C),q=0,oe=J.triangles.length;q<oe;q+=3)I(q,oe);else{var x=he().flatten(b),H=x.vertices,F=x.holes,k=F===void 0?[]:F;c=he()(H,k,2)}var se=(0,De.scaleLinear)((0,X.extent)(C,function(ve){return ve[0]}),[0,1]),we=(0,De.scaleLinear)((0,X.extent)(C,function(ve){return ve[1]}),[0,1]),ge=C.map(function(ve){var _e=N(ve,2),Pe=_e[0],ye=_e[1];return[se(Pe),we(ye)]}),xe={points:C,indices:c,uvs:ge};return{contour:b,triangles:xe}}var Ve=Fe,ze=new i.BufferGeometry().setAttribute?"setAttribute":"addAttribute";function Ge(u,O){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,y=u.map(function(b){return b.map(function(n){var g=N(n,2),C=g[0],L=g[1];return s?pe(C,L,O):[C,L,O]})});return he().flatten(y)}function We(u,O,s){for(var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,b=Ge(u,O,y),n=b.vertices,g=b.holes,C=Ge(u,s,y),L=C.vertices,G=(0,X.merge)([L,n]),U=Math.round(L.length/3),w=new Set(g),p=0,a=[],e=0;e<U;e++){var r=e+1;if(r===U)r=p;else if(w.has(r)){var t=r;r=p,p=t}a.push(e,e+U,r+U),a.push(r+U,r,e)}for(var c=[],d=1;d>=0;d--)for(var o=0;o<U;o+=1)c.push(o/(U-1),d);return{indices:a,vertices:G,uvs:c,topVerts:L}}function Ue(u,O,s){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,b=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return{indices:y?u.indices:u.indices.slice().reverse(),vertices:Ge([u.points],O,b).vertices,uvs:s}}var Qe=function(u){"use strict";(0,R.Z)(s,u);var O=(0,T.Z)(s);function s(y){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,V.Z)(this,s);var n;n=O.call(this),n.type="PolygonBufferGeometry",n.parameters=(0,f.Z)({},{polygonGeoJson:y,startHeight:0,endHeight:1,closedBottom:!0,closedTop:!0,includeSides:!0,curvatureResolution:5,cartesian:!0,userDataRsoOffset:0},b);var g=n.parameters,C=g.startHeight,L=g.endHeight,G=g.closedBottom,U=g.closedTop,w=g.includeSides,p=g.curvatureResolution,a=g.cartesian,e=g.userDataRsoOffset;de()(y[0])||y[0].reverse();var r=Ve(y,{resolution:p}),t=r.contour,c=r.triangles,d=(0,X.merge)(c.uvs),o=[],x=[],H=[],F=0,k=function(J){var q=Math.round(o.length/3),oe=H.length;o=o.concat(J.vertices),x=x.concat(J.uvs),H=H.concat(q?J.indices.map(function(se){return se+q}):J.indices),n.addGroup(oe,H.length-oe,F++)};if(w){var I=We(t,C,L,a);k(I),n.userData.rso=e?We(t,C,L+e,a):I}return G&&k(Ue(c,C,d,!1,a)),U&&k(Ue(c,L,d,!0,a)),n.setIndex(H),n[ze]("position",new i.Float32BufferAttribute(o,3)),n[ze]("uv",new i.Float32BufferAttribute(x,2)),n.computeVertexNormals(),n}return s}(i.BufferGeometry),Ye=function(u){"use strict";(0,R.Z)(s,u);var O=(0,T.Z)(s);function s(b){(0,V.Z)(this,s);var n;return n=O.call(this),n.options=(0,f.Z)({},{geojson:[[[]]],startHeight:0,height:5,closedBottom:!0,closedTop:!0,curvatureResolution:1,cartesian:!0,userDataRsoOffset:0},b),n}var y=s.prototype;return y.create=function(){var n=this.options,g=n.startHeight,C=n.height,L=n.closedBottom,G=n.closedTop,U=n.curvatureResolution,w=n.userDataRsoOffset,p=n.cartesian,a=new Qe(this.options.geojson,{startHeight:g,endHeight:g+C,closedBottom:L,closedTop:G,curvatureResolution:U,cartesian:p,userDataRsoOffset:w});this.createMesh(a,this.options.material)},s}(Te.BaseObject)})(),module.exports=Ie})();
@@ -18,7 +18,10 @@ export default class Draw<T extends {
18
18
  getAllObject<Y extends KeyOf<T>>(nameOrigin: Y, options?: {
19
19
  key: string;
20
20
  }): InstanceType<T[Y]>[];
21
- draw<Y extends KeyOf<T>, U extends KeyOf<T> | `${KeyOf<T>}#${string}` | IBaseObject>(nameOrigin: Y, options?: ConstructorParameters<T[Y]>[0] & {
21
+ draw<Y extends KeyOf<T>, U extends KeyOf<T> | `${KeyOf<T>}#${string}` | IBaseObject>(nameOrigin: Y, options?: ConstructorParameters<T[Y]>[0] extends undefined ? {
22
+ key?: string;
23
+ target?: U;
24
+ } : ConstructorParameters<T[Y]>[0] & {
22
25
  key?: string;
23
26
  target?: U;
24
27
  }, target?: U): Promise<InstanceType<T[Y]>>;
@@ -0,0 +1,10 @@
1
+ uniform sampler2D baseTexture;
2
+ uniform sampler2D bloomTexture;
3
+
4
+ varying vec2 vUv;
5
+
6
+ void main() {
7
+
8
+ gl_FragColor = (texture2D(baseTexture, vUv) + vec4(1.0) * texture2D(bloomTexture, vUv));
9
+
10
+ }
@@ -0,0 +1,9 @@
1
+ varying vec2 vUv;
2
+
3
+ void main() {
4
+
5
+ vUv = uv;
6
+
7
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
8
+
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gl-draw",
3
- "version": "0.0.22",
3
+ "version": "0.0.25",
4
4
  "author": "gitplus <hstits@gmail.com>",
5
5
  "scripts": {
6
6
  "start": "PORT=3002 bundler-dev",
@@ -23,28 +23,31 @@
23
23
  "last 1 safari version"
24
24
  ]
25
25
  },
26
+ "peerDependencies": {
27
+ "@tweenjs/tween.js": "^18.6.4",
28
+ "three": ">=0.136.0"
29
+ },
26
30
  "resolutions": {
27
31
  "memfs": "^3.4.4"
28
32
  },
29
33
  "devDependencies": {
30
34
  "@types/three": "^0.136.0",
31
35
  "copyfiles": "^2.4.1",
32
- "eslint-config-bundler": "^0.1.1",
33
- "eslint-import-resolver-webpack": "^0.13.2",
36
+ "eslint-config-bundler": "^0.1.4",
34
37
  "events": "^3.3.0",
35
38
  "ky": "^0.30.0",
36
39
  "msw": "^0.39.2",
37
40
  "pinia": "^2.0.14",
41
+ "prettier-config-bundler": "^0.1.2",
38
42
  "regenerator-runtime": "^0.13.9",
39
43
  "stylelint": "^14.5.3",
40
44
  "stylelint-config-prettier": "^9.0.3",
41
45
  "stylelint-config-standard": "^25.0.0",
42
- "tailwind-config-bundler": "^0.1.0",
43
- "tailwindcss": "^3.1.4",
46
+ "tailwind-config-bundler": "^0.1.2",
44
47
  "tsc-alias": "^1.6.11",
45
48
  "vue": "^3.2.31",
46
49
  "vue-auto-routing": "^1.0.1",
47
- "vue-bundler": "^0.1.28",
50
+ "vue-bundler": "^0.1.37",
48
51
  "vue-router": "^4.0.14"
49
52
  },
50
53
  "dependencies": {
@@ -64,5 +67,6 @@
64
67
  },
65
68
  "msw": {
66
69
  "workerDirectory": "public"
67
- }
70
+ },
71
+ "prettier": "prettier-config-bundler"
68
72
  }