gl-draw 0.0.25 → 0.0.26

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.
File without changes
@@ -0,0 +1,13 @@
1
+ import * as THREE from 'three';
2
+ import { BaseObject } from '../../index';
3
+ interface Options {
4
+ pts: THREE.Vector2[];
5
+ material: THREE.Material | THREE.Material[];
6
+ depth: number;
7
+ }
8
+ export default class extends BaseObject {
9
+ options: Required<Options>;
10
+ constructor(options: Options);
11
+ create(): void;
12
+ }
13
+ export {};
@@ -4,4 +4,5 @@ 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';
7
+ export { default as ConicPolygon } from './conicPolygon';
8
+ export { default as ExtrudePolygon } from './extrudePolygon';
@@ -1,4 +1,4 @@
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;
1
+ (function(){var nt={187:function(V){"use strict";var T=typeof Reflect=="object"?Reflect:null,d=T&&typeof T.apply=="function"?T.apply:function(m,x,R){return Function.prototype.apply.call(m,x,R)},E;T&&typeof T.ownKeys=="function"?E=T.ownKeys:Object.getOwnPropertySymbols?E=function(m){return Object.getOwnPropertyNames(m).concat(Object.getOwnPropertySymbols(m))}:E=function(m){return Object.getOwnPropertyNames(m)};function j(_){console&&console.warn&&console.warn(_)}var a=Number.isNaN||function(m){return m!==m};function p(){p.init.call(this)}V.exports=p,V.exports.once=N,p.EventEmitter=p,p.prototype._events=void 0,p.prototype._eventsCount=0,p.prototype._maxListeners=void 0;var A=10;function z(_){if(typeof _!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof _)}Object.defineProperty(p,"defaultMaxListeners",{enumerable:!0,get:function(){return A},set:function(_){if(typeof _!="number"||_<0||a(_))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+_+".");A=_}}),p.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},p.prototype.setMaxListeners=function(m){if(typeof m!="number"||m<0||a(m))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+m+".");return this._maxListeners=m,this};function B(_){return _._maxListeners===void 0?p.defaultMaxListeners:_._maxListeners}p.prototype.getMaxListeners=function(){return B(this)},p.prototype.emit=function(m){for(var x=[],R=1;R<arguments.length;R++)x.push(arguments[R]);var U=m==="error",H=this._events;if(H!==void 0)U=U&&H.error===void 0;else if(!U)return!1;if(U){var X;if(x.length>0&&(X=x[0]),X instanceof Error)throw X;var ie=new Error("Unhandled error."+(X?" ("+X.message+")":""));throw ie.context=X,ie}var pe=H[m];if(pe===void 0)return!1;if(typeof pe=="function")d(pe,this,x);else for(var xe=pe.length,me=se(pe,xe),R=0;R<xe;++R)d(me[R],this,x);return!0};function h(_,m,x,R){var U,H,X;if(z(x),H=_._events,H===void 0?(H=_._events=Object.create(null),_._eventsCount=0):(H.newListener!==void 0&&(_.emit("newListener",m,x.listener?x.listener:x),H=_._events),X=H[m]),X===void 0)X=H[m]=x,++_._eventsCount;else if(typeof X=="function"?X=H[m]=R?[x,X]:[X,x]:R?X.unshift(x):X.push(x),U=B(_),U>0&&X.length>U&&!X.warned){X.warned=!0;var ie=new Error("Possible EventEmitter memory leak detected. "+X.length+" "+String(m)+" listeners added. Use emitter.setMaxListeners() to increase limit");ie.name="MaxListenersExceededWarning",ie.emitter=_,ie.type=m,ie.count=X.length,j(ie)}return _}p.prototype.addListener=function(m,x){return h(this,m,x,!1)},p.prototype.on=p.prototype.addListener,p.prototype.prependListener=function(m,x){return h(this,m,x,!0)};function ee(){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 $(_,m,x){var R={fired:!1,wrapFn:void 0,target:_,type:m,listener:x},U=ee.bind(R);return U.listener=x,R.wrapFn=U,U}p.prototype.once=function(m,x){return z(x),this.on(m,$(this,m,x)),this},p.prototype.prependOnceListener=function(m,x){return z(x),this.prependListener(m,$(this,m,x)),this},p.prototype.removeListener=function(m,x){var R,U,H,X,ie;if(z(x),U=this._events,U===void 0)return this;if(R=U[m],R===void 0)return this;if(R===x||R.listener===x)--this._eventsCount===0?this._events=Object.create(null):(delete U[m],U.removeListener&&this.emit("removeListener",m,R.listener||x));else if(typeof R!="function"){for(H=-1,X=R.length-1;X>=0;X--)if(R[X]===x||R[X].listener===x){ie=R[X].listener,H=X;break}if(H<0)return this;H===0?R.shift():oe(R,H),R.length===1&&(U[m]=R[0]),U.removeListener!==void 0&&this.emit("removeListener",m,ie||x)}return this},p.prototype.off=p.prototype.removeListener,p.prototype.removeAllListeners=function(m){var x,R,U;if(R=this._events,R===void 0)return this;if(R.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):R[m]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete R[m]),this;if(arguments.length===0){var H=Object.keys(R),X;for(U=0;U<H.length;++U)X=H[U],X!=="removeListener"&&this.removeAllListeners(X);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(x=R[m],typeof x=="function")this.removeListener(m,x);else if(x!==void 0)for(U=x.length-1;U>=0;U--)this.removeListener(m,x[U]);return this};function J(_,m,x){var R=_._events;if(R===void 0)return[];var U=R[m];return U===void 0?[]:typeof U=="function"?x?[U.listener||U]:[U]:x?K(U):se(U,U.length)}p.prototype.listeners=function(m){return J(this,m,!0)},p.prototype.rawListeners=function(m){return J(this,m,!1)},p.listenerCount=function(_,m){return typeof _.listenerCount=="function"?_.listenerCount(m):te.call(_,m)},p.prototype.listenerCount=te;function te(_){var m=this._events;if(m!==void 0){var x=m[_];if(typeof x=="function")return 1;if(x!==void 0)return x.length}return 0}p.prototype.eventNames=function(){return this._eventsCount>0?E(this._events):[]};function se(_,m){for(var x=new Array(m),R=0;R<m;++R)x[R]=_[R];return x}function oe(_,m){for(;m+1<_.length;m++)_[m]=_[m+1];_.pop()}function K(_){for(var m=new Array(_.length),x=0;x<m.length;++x)m[x]=_[x].listener||_[x];return m}function N(_,m){return new Promise(function(x,R){function U(X){_.removeListener(m,H),R(X)}function H(){typeof _.removeListener=="function"&&_.removeListener("error",U),x([].slice.call(arguments))}k(_,m,H,{once:!0}),m!=="error"&&G(_,U,{once:!0})})}function G(_,m,x){typeof _.on=="function"&&k(_,"error",m,x)}function k(_,m,x,R){if(typeof _.on=="function")R.once?_.once(m,x):_.on(m,x);else if(typeof _.addEventListener=="function")_.addEventListener(m,function U(H){R.once&&_.removeEventListener(m,U),x(H)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof _)}},666:function(V){var T=function(d){"use strict";var E=Object.prototype,j=E.hasOwnProperty,a,p=typeof Symbol=="function"?Symbol:{},A=p.iterator||"@@iterator",z=p.asyncIterator||"@@asyncIterator",B=p.toStringTag||"@@toStringTag";function h(O,S,D){return Object.defineProperty(O,S,{value:D,enumerable:!0,configurable:!0,writable:!0}),O[S]}try{h({},"")}catch(O){h=function(S,D,W){return S[D]=W}}function ee(O,S,D,W){var I=S&&S.prototype instanceof N?S:N,ae=Object.create(I.prototype),le=new me(W||[]);return ae._invoke=X(O,D,le),ae}d.wrap=ee;function $(O,S,D){try{return{type:"normal",arg:O.call(S,D)}}catch(W){return{type:"throw",arg:W}}}var J="suspendedStart",te="suspendedYield",se="executing",oe="completed",K={};function N(){}function G(){}function k(){}var _={};h(_,A,function(){return this});var m=Object.getPrototypeOf,x=m&&m(m(Ce([])));x&&x!==E&&j.call(x,A)&&(_=x);var R=k.prototype=N.prototype=Object.create(_);G.prototype=k,h(R,"constructor",k),h(k,"constructor",G),G.displayName=h(k,B,"GeneratorFunction");function U(O){["next","throw","return"].forEach(function(S){h(O,S,function(D){return this._invoke(S,D)})})}d.isGeneratorFunction=function(O){var S=typeof O=="function"&&O.constructor;return S?S===G||(S.displayName||S.name)==="GeneratorFunction":!1},d.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,k):(O.__proto__=k,h(O,B,"GeneratorFunction")),O.prototype=Object.create(R),O},d.awrap=function(O){return{__await:O}};function H(O,S){function D(ae,le,ue,fe){var he=$(O[ae],O,le);if(he.type==="throw")fe(he.arg);else{var ge=he.arg,Me=ge.value;return Me&&typeof Me=="object"&&j.call(Me,"__await")?S.resolve(Me.__await).then(function(we){D("next",we,ue,fe)},function(we){D("throw",we,ue,fe)}):S.resolve(Me).then(function(we){ge.value=we,ue(ge)},function(we){return D("throw",we,ue,fe)})}}var W;function I(ae,le){function ue(){return new S(function(fe,he){D(ae,le,fe,he)})}return W=W?W.then(ue,ue):ue()}this._invoke=I}U(H.prototype),h(H.prototype,z,function(){return this}),d.AsyncIterator=H,d.async=function(O,S,D,W,I){I===void 0&&(I=Promise);var ae=new H(ee(O,S,D,W),I);return d.isGeneratorFunction(S)?ae:ae.next().then(function(le){return le.done?le.value:ae.next()})};function X(O,S,D){var W=J;return function(ae,le){if(W===se)throw new Error("Generator is already running");if(W===oe){if(ae==="throw")throw le;return Re()}for(D.method=ae,D.arg=le;;){var ue=D.delegate;if(ue){var fe=ie(ue,D);if(fe){if(fe===K)continue;return fe}}if(D.method==="next")D.sent=D._sent=D.arg;else if(D.method==="throw"){if(W===J)throw W=oe,D.arg;D.dispatchException(D.arg)}else D.method==="return"&&D.abrupt("return",D.arg);W=se;var he=$(O,S,D);if(he.type==="normal"){if(W=D.done?oe:te,he.arg===K)continue;return{value:he.arg,done:D.done}}else he.type==="throw"&&(W=oe,D.method="throw",D.arg=he.arg)}}}function ie(O,S){var D=O.iterator[S.method];if(D===a){if(S.delegate=null,S.method==="throw"){if(O.iterator.return&&(S.method="return",S.arg=a,ie(O,S),S.method==="throw"))return K;S.method="throw",S.arg=new TypeError("The iterator does not provide a 'throw' method")}return K}var W=$(D,O.iterator,S.arg);if(W.type==="throw")return S.method="throw",S.arg=W.arg,S.delegate=null,K;var I=W.arg;if(!I)return S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,K;if(I.done)S[O.resultName]=I.value,S.next=O.nextLoc,S.method!=="return"&&(S.method="next",S.arg=a);else return I;return S.delegate=null,K}U(R),h(R,B,"Generator"),h(R,A,function(){return this}),h(R,"toString",function(){return"[object Generator]"});function pe(O){var S={tryLoc:O[0]};1 in O&&(S.catchLoc=O[1]),2 in O&&(S.finallyLoc=O[2],S.afterLoc=O[3]),this.tryEntries.push(S)}function xe(O){var S=O.completion||{};S.type="normal",delete S.arg,O.completion=S}function me(O){this.tryEntries=[{tryLoc:"root"}],O.forEach(pe,this),this.reset(!0)}d.keys=function(O){var S=[];for(var D in O)S.push(D);return S.reverse(),function W(){for(;S.length;){var I=S.pop();if(I in O)return W.value=I,W.done=!1,W}return W.done=!0,W}};function Ce(O){if(O){var S=O[A];if(S)return S.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var D=-1,W=function I(){for(;++D<O.length;)if(j.call(O,D))return I.value=O[D],I.done=!1,I;return I.value=a,I.done=!0,I};return W.next=W}}return{next:Re}}d.values=Ce;function Re(){return{value:a,done:!0}}return me.prototype={constructor:me,reset:function(O){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(xe),!O)for(var S in this)S.charAt(0)==="t"&&j.call(this,S)&&!isNaN(+S.slice(1))&&(this[S]=a)},stop:function(){this.done=!0;var O=this.tryEntries[0],S=O.completion;if(S.type==="throw")throw S.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var S=this;function D(fe,he){return ae.type="throw",ae.arg=O,S.next=fe,he&&(S.method="next",S.arg=a),!!he}for(var W=this.tryEntries.length-1;W>=0;--W){var I=this.tryEntries[W],ae=I.completion;if(I.tryLoc==="root")return D("end");if(I.tryLoc<=this.prev){var le=j.call(I,"catchLoc"),ue=j.call(I,"finallyLoc");if(le&&ue){if(this.prev<I.catchLoc)return D(I.catchLoc,!0);if(this.prev<I.finallyLoc)return D(I.finallyLoc)}else if(le){if(this.prev<I.catchLoc)return D(I.catchLoc,!0)}else if(ue){if(this.prev<I.finallyLoc)return D(I.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(O,S){for(var D=this.tryEntries.length-1;D>=0;--D){var W=this.tryEntries[D];if(W.tryLoc<=this.prev&&j.call(W,"finallyLoc")&&this.prev<W.finallyLoc){var I=W;break}}I&&(O==="break"||O==="continue")&&I.tryLoc<=S&&S<=I.finallyLoc&&(I=null);var ae=I?I.completion:{};return ae.type=O,ae.arg=S,I?(this.method="next",this.next=I.finallyLoc,K):this.complete(ae)},complete:function(O,S){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&S&&(this.next=S),K},finish:function(O){for(var S=this.tryEntries.length-1;S>=0;--S){var D=this.tryEntries[S];if(D.finallyLoc===O)return this.complete(D.completion,D.afterLoc),xe(D),K}},catch:function(O){for(var S=this.tryEntries.length-1;S>=0;--S){var D=this.tryEntries[S];if(D.tryLoc===O){var W=D.completion;if(W.type==="throw"){var I=W.arg;xe(D)}return I}}throw new Error("illegal catch attempt")},delegateYield:function(O,S,D){return this.delegate={iterator:Ce(O),resultName:S,nextLoc:D},this.method==="next"&&(this.arg=a),K}},d}(V.exports);try{regeneratorRuntime=T}catch(d){typeof globalThis=="object"?globalThis.regeneratorRuntime=T:Function("r","regeneratorRuntime = r")(T)}},701:function(V,T,d){"use strict";d.d(T,{ZP:function(){return oe}});var E=d(438),j=d(998);function a(){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 p(K,N,G){return a()?p=Reflect.construct:p=function(_,m,x){var R=[null];R.push.apply(R,m);var U=Function.bind.apply(_,R),H=new U;return x&&(0,j.Z)(H,x.prototype),H},p.apply(null,arguments)}function A(K,N,G){return p.apply(null,arguments)}var z=d(951),B=d(342),h=d(644),ee=d(282),$=require("three/examples/jsm/renderers/CSS2DRenderer"),J=d(530),te=d(519),se=function(K){K&&((0,te.disposeMesh)(K),K.children.forEach(function(N){N.userData.BaseObject_||se(N)}))},oe=function(){"use strict";function K(){(0,E.Z)(this,K),this.objecttype__="BaseObject",this.userData={},this.pm=(0,ee.Z)(),this.visible=!1}var N=K.prototype;return N.init=function(){},N.create=function(){},N.render=function(){},N.update=function(k,_){},N.resize=function(k,_){},N.show=function(){return this.object3d&&(this.object3d.visible=!0),this.visible=!0,this},N.hide=function(){return this.object3d&&(this.object3d.visible=!1),this.visible=!1,this},N.isVisible=function(){return this.visible},N.createMesh=function(){for(var k=arguments.length,_=new Array(k),m=0;m<k;m++)_[m]=arguments[m];return this.object3d=A(h.Mesh,(0,B.Z)(_)),this},N.createGroup=function(){return this.object3d=new h.Group,this},N.createPoints=function(){for(var k=arguments.length,_=new Array(k),m=0;m<k;m++)_[m]=arguments[m];return this.object3d=A(h.Points,(0,B.Z)(_)),this},N.createCSS2DObject=function(k){return this.object3d=new $.CSS2DObject(k),this},N.createCSS3DObject=function(k){return this.object3d=new J.CSS3DObject(k),this},N.createCSS3DSprite=function(k){return this.object3d=new J.CSS3DSprite(k),this},N.createSprite=function(k){return this.object3d=new h.Sprite(k),this},N.add=function(){for(var k=arguments.length,_=new Array(k),m=0;m<k;m++)_[m]=arguments[m];var x;return(x=this.object3d).add.apply(x,(0,B.Z)(_)),this},N.remove=function(){for(var k=arguments.length,_=new Array(k),m=0;m<k;m++)_[m]=arguments[m];var x;return(x=this.object3d).remove.apply(x,(0,B.Z)(_)),this},N.getSize=function(){var k=new h.Box3().setFromObject(this.object3d);return{min:k.min,max:k.max,size:k.getSize(new h.Vector3)}},N.traverse=function(k){k(this),this.children.forEach(function(_){_.traverse(k)})},N.dispose=function(){se(this.object3d)},(0,z.Z)(K,[{key:"parent",get:function(){var k=this.object3d.parent;return(k==null?void 0:k.userData.BaseObject_)||this.pencil.scene}},{key:"children",get:function(){return this.object3d.children.map(function(k){return k.userData.BaseObject_}).filter(function(k){return!!k})}}]),K}()},896:function(V,T,d){"use strict";d.d(T,{Z:function(){return j}});var E=d(438),j=function(){"use strict";function a(A){(0,E.Z)(this,a),this.guiParams={},A&&(this.guiParams=A)}var p=a.prototype;return p.showGui=function(z){var B=this;!z||Object.keys(this.guiParams).forEach(function(h){var ee=z.addFolder(h),$=B.guiParams[h];Object.keys($).forEach(function(J){var te=$[J],se=te.min,oe=te.max,K=te.step,N=te.name,G=te.paramMap,k=te.items,_=te.value,m=te.target,x=J.toLowerCase().indexOf("color")>-1,R,U=typeof _=="undefined"&&m,H=U?m():$[J],X=U?J:"value";k?R=ee.add(H,X,k):x?R=ee.addColor(H,X):R=ee.add(H,X),R=R.name(N||J),typeof se!="undefined"&&(R=R.min(se)),typeof oe!="undefined"&&(R=R.max(oe)),typeof K!="undefined"&&(R=R.step(K)),R=R.onChange(function(){B.setTargetValue(h,J,H[X],G)}),U&&R.listen()})})},p.setTargetValue=function(z,B,h,ee){var $=this.guiParams[z][B],J=$.onChange,te=$.target,se=$.value,oe=B.toLowerCase().indexOf("color")>-1,K=typeof se=="undefined"&&te;if(te&&!K){var N=te();Array.isArray(N)||(N=[N]),N.forEach(function(G){if(!!G)if(oe)try{G[ee||B].set(h)}catch(k){B!=="color"&&!ee&&console.warn("".concat(B," is not a color,set paramMap"))}else G[ee||B]=h})}J&&J(h)},p.setTargetValueByParams=function(){var z=this;Object.keys(this.guiParams).forEach(function(B){Object.keys(z.guiParams[B]).forEach(function(h){var ee=z.guiParams[B][h];typeof ee.value!="undefined"&&z.setTargetValue(B,h,ee.value,ee.paramMap)})})},a}()},639:function(V,T,d){"use strict";d.d(T,{BaseObject:function(){return C.ZP}});var E=d(438),j=d(951),a=d(42),p=d(396),A=d(342),z=d(494),B=d.n(z),h=d(644),ee=d(187),$=require("deepmerge"),J=d.n($),te=require("three/examples/jsm/libs/stats.module"),se=d.n(te),oe=require("lil-gui"),K=d.n(oe),N=d(896),G={None:h.NoToneMapping,Linear:h.LinearToneMapping,Reinhard:h.ReinhardToneMapping,Cineon:h.CineonToneMapping,ACESFilmic:h.ACESFilmicToneMapping},k={antialias:!1,devicePixelRatio:window.devicePixelRatio,powerPreference:"high-performance",toneMapping:"None",toneMappingExposure:1,alpha:!1,outputEncoding:h.LinearEncoding,logarithmicDepthBuffer:!1,preserveDrawingBuffer:!1},_=function(){"use strict";function v(s){(0,E.Z)(this,v),this.options=s;var e=s.width,r=s.height,n=s.rendererParams,o=n.alpha,c=n.devicePixelRatio,t=n.antialias,P=n.powerPreference,L=n.toneMapping,Z=n.toneMappingExposure,M=n.outputEncoding,F=n.logarithmicDepthBuffer,Y=n.preserveDrawingBuffer,Q=new h.WebGLRenderer({alpha:o,antialias:t,powerPreference:P,logarithmicDepthBuffer:F,preserveDrawingBuffer:Y});Q.setSize(e,r),Q.setPixelRatio(c),Q.autoClear=!1,Q.toneMapping=G[L],Q.toneMappingExposure=Z,Q.outputEncoding=M,this.renderer=Q}var f=v.prototype;return f.setSize=function(e,r){this.renderer.setSize(e,r)},f.render=function(){var e=this.options,r=e.scene,n=e.camera;this.renderer.render(r,n)},f.setGui=function(e){var r=this,n=new N.Z({renderer:{toneMapping:{value:this.options.rendererParams.toneMapping,items:G,target:function(){return r.renderer}},toneMappingExposure:{value:this.options.rendererParams.toneMappingExposure,min:0,max:Math.pow(2,4),target:function(){return r.renderer}}}});n.showGui(e)},f.dispose=function(){var e,r,n;(e=this.renderer)===null||e===void 0||e.clear(),(r=this.renderer)===null||r===void 0||r.dispose(),(n=this.renderer)===null||n===void 0||n.renderLists.dispose()},v}(),m={fov:45,near:1,far:1e3},x=function(){"use strict";function v(s){(0,E.Z)(this,v),this.oldCameraPosition=new h.Vector3,this.oldCameraRotation=new h.Euler,this.customCamera=!1,this.options=s;var e=s.width,r=s.height,n=s.cameraParams;if(n instanceof h.Camera)this.camera=n,this.customCamera=!0;else{var o=n.fov,c=n.far,t=n.near,P=new h.PerspectiveCamera(o,e/r,t,c);P.position.set(0,0,400),P.lookAt(0,0,0),this.camera=P}}var f=v.prototype;return f.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},f.setSize=function(e,r){this.camera instanceof h.PerspectiveCamera&&(this.camera.aspect=e/r),this.camera.updateProjectionMatrix()},f.setGui=function(e){var r=this,n=new N.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(o){r.camera.updateProjectionMatrix()}},far:{min:0,max:2e4,step:1,target:function(){return r.camera},onChange:function(o){r.camera.updateProjectionMatrix()}}}});this.camera instanceof h.PerspectiveCamera&&(n.guiParams.camera.fov={min:0,max:90,step:1,target:function(){return r.camera},onChange:function(o){r.camera.updateProjectionMatrix()}}),n.showGui(e)},v}(),R=d(519),U={background:null},H=function(){"use strict";function v(s){(0,E.Z)(this,v),this.options=s;var e=s.camera,r=s.sceneParams,n=r.background,o=new h.Scene;n&&(o.background=n),o.add(e),this.scene=o}var f=v.prototype;return f.addAxesHelper=function(){var e,r=new h.AxesHelper(100);(e=this.scene)===null||e===void 0||e.add(r)},f.dispose=function(){var e;(e=this.scene)===null||e===void 0||e.traverse(function(r){(0,R.disposeMesh)(r)})},v}(),X=require("three/examples/jsm/controls/OrbitControls"),ie={},pe=function(){"use strict";function v(s){(0,E.Z)(this,v),this.options=s;var e=s.camera,r=s.controlParams,n=s.mapControl,o=r.domElement,c=n?new X.MapControls(e,o):new X.OrbitControls(e,o);c.minPolarAngle=Math.PI*.15,c.maxPolarAngle=Math.PI*.85,c.enableDamping=!0,c.dampingFactor=.063,c.autoRotate=!1,c.autoRotateSpeed=-60,c.enableZoom=!0,c.zoomSpeed=.2,this.control=c}var f=v.prototype;return f.limitPan=function(e){var r=e.maxX,n=r===void 0?1/0:r,o=e.minX,c=o===void 0?-1/0:o,t=e.maxZ,P=t===void 0?1/0:t,L=e.minZ,Z=L===void 0?-1/0:L,M=e.maxY,F=M===void 0?1/0:M,Y=e.minY,Q=Y===void 0?-1/0:Y,ne=this.limitPanV||new h.Vector3,re=this.control,de=this.options.camera,ce=new h.Vector3(c,Q,Z),ye=new h.Vector3(n,F,P);this.limitPanV=ne,ne.copy(re.target),re.target.clamp(ce,ye),ne.sub(re.target),de.position.sub(ne)},f.update=function(){this.control.update()},f.dispose=function(){this.control.dispose()},v}(),xe=d(530),me=new h.Vector3,Ce=new h.Matrix4,Re=new h.Matrix4,O=new h.Vector3,S=new h.Vector3,D=function v(){"use strict";var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,E.Z)(this,v);var s=function(Y,Q){return O.setFromMatrixPosition(Y.matrixWorld),S.setFromMatrixPosition(Q.matrixWorld),O.distanceToSquared(S)},e=function(Y){var Q=[];return Y.traverse(function(ne){ne.isCSS2DObject&&Q.push(ne)}),Q},r=function(Y){for(var Q=e(Y).sort(function(ye,je){if(ye.renderOrder!==je.renderOrder)return je.renderOrder-ye.renderOrder;var Le=L.objects.get(ye).distanceToCameraSquared,ze=L.objects.get(je).distanceToCameraSquared;return Le-ze}),ne=Q.length,re=0,de=Q.length;re<de;re++){var ce=Q[re].userData.zIndexFix||0;Q[re].element.style.zIndex=ne-re+ce}},n=this,o,c,t,P,L={objects:new WeakMap},Z=f.element!==void 0?f.element:document.createElement("div");Z.style.overflow="hidden",this.domElement=Z,this.getSize=function(){return{width:o,height:c}},this.render=function(F,Y){F.autoUpdate===!0&&F.updateMatrixWorld(),Y.parent===null&&Y.updateMatrixWorld(),Ce.copy(Y.matrixWorldInverse),Re.multiplyMatrices(Y.projectionMatrix,Ce),M(F,F,Y),r(F)},this.setSize=function(F,Y){o=F,c=Y,t=o/2,P=c/2,Z.style.width="".concat(F,"px"),Z.style.height="".concat(Y,"px")};function M(F,Y,Q){if(F.isCSS2DObject){me.setFromMatrixPosition(F.matrixWorld),me.applyMatrix4(Re);var ne=F.visible===!0&&me.z>=-1&&me.z<=1&&F.layers.test(Q.layers)===!0;if(F.element.style.display=ne===!0?"":"none",ne===!0){F.onBeforeRender(n,Y,Q);var re=F.element;re.style.transform="translate(-50%,-50%) translate(".concat(me.x*t+t,"px,").concat(-me.y*P+P,"px)"),re.parentNode!==Z&&Z.appendChild(re),F.onAfterRender(n,Y,Q)}var de={distanceToCameraSquared:s(Q,F)};L.objects.set(F,de)}for(var ce=0,ye=F.children.length;ce<ye;ce++)M(F.children[ce],Y,Q)}},W={zIndex:"auto"},I=function(){"use strict";function v(s){(0,E.Z)(this,v),this.container=s}var f=v.prototype;return f.addRenderer=function(e,r){var n=this.container,o=n.offsetWidth,c=n.offsetHeight,t=e==="css2d"?new D:new xe.CSS3DRenderer;t.domElement.style.position="absolute",t.domElement.style.top="0",t.domElement.style.pointerEvents="none",t.domElement.style.zIndex=r.zIndex,t.setSize(o,c),n.appendChild(t.domElement),e==="css2d"?this.css2Drenderer=t:e==="css3d"&&(this.css3Drenderer=t)},f.setSize=function(e,r){var n,o;(n=this.css2Drenderer)===null||n===void 0||n.setSize(e,r),(o=this.css3Drenderer)===null||o===void 0||o.setSize(e,r)},f.render=function(e,r){var n,o;(n=this.css2Drenderer)===null||n===void 0||n.render(e,r),(o=this.css3Drenderer)===null||o===void 0||o.render(e,r)},f.dispose=function(){this.css2Drenderer=void 0,this.css3Drenderer=void 0},v}(),ae=require("three/examples/jsm/postprocessing/EffectComposer"),le=require("three/examples/jsm/postprocessing/RenderPass"),ue=require("three/examples/jsm/postprocessing/ShaderPass"),fe=require("three/examples/jsm/shaders/CopyShader"),he=require("three/examples/jsm/shaders/GammaCorrectionShader"),ge=require("three/examples/jsm/postprocessing/SMAAPass"),Me=require("three/examples/jsm/postprocessing/SSAARenderPass"),we=require("three/examples/jsm/shaders/FXAAShader"),Ne=function(){try{var v=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&v.getContext("webgl2"))}catch(f){return!1}},tt=0,Ae=1,Te=!1,Be=Ne()!==!1,He=d.p+"static/media/vertex.cc08e9108dec6da9504a.glsl",Xe=d.p+"static/media/fragment.2913fac3481dac4d4a06.glsl",De=d(668),Ke=d(485),Ve=require("three/examples/jsm/postprocessing/Pass"),Fe=require("three/examples/jsm/shaders/LuminosityHighPassShader"),Ze=function(v){"use strict";(0,De.Z)(s,v);var f=(0,Ke.Z)(s);function s(r,n,o,c){(0,E.Z)(this,s);var t;t=f.call(this),t.strength=n!==void 0?n:1,t.radius=o,t.threshold=c,t.resolution=r!==void 0?new h.Vector2(r.x,r.y):new h.Vector2(256,256),t.clearColor=new h.Color(0,0,0);var P={minFilter:h.LinearFilter,magFilter:h.LinearFilter,format:h.RGBAFormat};t.renderTargetsHorizontal=[],t.renderTargetsVertical=[],t.nMips=5;var L=Math.round(t.resolution.x/2),Z=Math.round(t.resolution.y/2);t.renderTargetBright=new h.WebGLRenderTarget(L,Z,P),t.renderTargetBright.texture.name="UnrealBloomPass.bright",t.renderTargetBright.texture.generateMipmaps=!1;for(var M=0;M<t.nMips;M++){var F=new h.WebGLRenderTarget(L,Z,P);F.texture.name="UnrealBloomPass.h".concat(M),F.texture.generateMipmaps=!1,t.renderTargetsHorizontal.push(F);var Y=new h.WebGLRenderTarget(L,Z,P);Y.texture.name="UnrealBloomPass.v".concat(M),Y.texture.generateMipmaps=!1,t.renderTargetsVertical.push(Y),L=Math.round(L/2),Z=Math.round(Z/2)}Fe.LuminosityHighPassShader===void 0&&console.error("THREE.UnrealBloomPass relies on LuminosityHighPassShader");var Q=Fe.LuminosityHighPassShader;t.highPassUniforms=h.UniformsUtils.clone(Q.uniforms),t.highPassUniforms.luminosityThreshold.value=c,t.highPassUniforms.smoothWidth.value=.01,t.materialHighPassFilter=new h.ShaderMaterial({uniforms:t.highPassUniforms,vertexShader:Q.vertexShader,fragmentShader:Q.fragmentShader,defines:{}}),t.separableBlurMaterials=[];var ne=[3,5,7,9,11];L=Math.round(t.resolution.x/2),Z=Math.round(t.resolution.y/2);for(var re=0;re<t.nMips;re++)t.separableBlurMaterials.push(t.getSeperableBlurMaterial(ne[re])),t.separableBlurMaterials[re].uniforms.texSize.value=new h.Vector2(L,Z),L=Math.round(L/2),Z=Math.round(Z/2);t.compositeMaterial=t.getCompositeMaterial(t.nMips),t.compositeMaterial.uniforms.blurTexture1.value=t.renderTargetsVertical[0].texture,t.compositeMaterial.uniforms.blurTexture2.value=t.renderTargetsVertical[1].texture,t.compositeMaterial.uniforms.blurTexture3.value=t.renderTargetsVertical[2].texture,t.compositeMaterial.uniforms.blurTexture4.value=t.renderTargetsVertical[3].texture,t.compositeMaterial.uniforms.blurTexture5.value=t.renderTargetsVertical[4].texture,t.compositeMaterial.uniforms.bloomStrength.value=n,t.compositeMaterial.uniforms.bloomRadius.value=.1,t.compositeMaterial.needsUpdate=!0;var de=[1,.8,.6,.4,.2];t.compositeMaterial.uniforms.bloomFactors.value=de,t.bloomTintColors=[new h.Vector3(1,1,1),new h.Vector3(1,1,1),new h.Vector3(1,1,1),new h.Vector3(1,1,1),new h.Vector3(1,1,1)],t.compositeMaterial.uniforms.bloomTintColors.value=t.bloomTintColors,fe.CopyShader===void 0&&console.error("THREE.UnrealBloomPass relies on CopyShader");var ce=fe.CopyShader;return t.copyUniforms=h.UniformsUtils.clone(ce.uniforms),t.copyUniforms.opacity.value=1,t.materialCopy=new h.ShaderMaterial({uniforms:t.copyUniforms,vertexShader:ce.vertexShader,fragmentShader:ce.fragmentShader,blending:h.AdditiveBlending,depthTest:!1,depthWrite:!1,transparent:!0}),t.enabled=!0,t.needsSwap=!1,t._oldClearColor=new h.Color,t.oldClearAlpha=1,t.basic=new h.MeshBasicMaterial,t.fsQuad=new Ve.FullScreenQuad(void 0),t}var e=s.prototype;return e.dispose=function(){for(var n=0;n<this.renderTargetsHorizontal.length;n++)this.renderTargetsHorizontal[n].dispose();for(var o=0;o<this.renderTargetsVertical.length;o++)this.renderTargetsVertical[o].dispose();this.renderTargetBright.dispose()},e.setSize=function(n,o){var c=Math.round(n/2),t=Math.round(o/2);this.renderTargetBright.setSize(c,t);for(var P=0;P<this.nMips;P++)this.renderTargetsHorizontal[P].setSize(c,t),this.renderTargetsVertical[P].setSize(c,t),this.separableBlurMaterials[P].uniforms.texSize.value=new h.Vector2(c,t),c=Math.round(c/2),t=Math.round(t/2)},e.render=function(n,o,c,t,P){n.getClearColor(this._oldClearColor),this.oldClearAlpha=n.getClearAlpha();var L=n.autoClear;n.autoClear=!1,n.setClearColor(this.clearColor,0),P&&n.state.buffers.stencil.setTest(!1),this.renderToScreen&&(this.fsQuad.material=this.basic,this.basic.map=c.texture,n.setRenderTarget(null),n.clear(),this.fsQuad.render(n)),this.highPassUniforms.tDiffuse.value=c.texture,this.highPassUniforms.luminosityThreshold.value=this.threshold,this.fsQuad.material=this.materialHighPassFilter,n.setRenderTarget(this.renderTargetBright),n.clear(),this.fsQuad.render(n);for(var Z=this.renderTargetBright,M=0;M<this.nMips;M++)this.fsQuad.material=this.separableBlurMaterials[M],this.separableBlurMaterials[M].uniforms.colorTexture.value=Z.texture,this.separableBlurMaterials[M].uniforms.direction.value=s.BlurDirectionX,n.setRenderTarget(this.renderTargetsHorizontal[M]),n.clear(),this.fsQuad.render(n),this.separableBlurMaterials[M].uniforms.colorTexture.value=this.renderTargetsHorizontal[M].texture,this.separableBlurMaterials[M].uniforms.direction.value=s.BlurDirectionY,n.setRenderTarget(this.renderTargetsVertical[M]),n.clear(),this.fsQuad.render(n),Z=this.renderTargetsVertical[M];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,n.setRenderTarget(this.renderTargetsHorizontal[0]),n.clear(),this.fsQuad.render(n),this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.renderTargetsHorizontal[0].texture,P&&n.state.buffers.stencil.setTest(!0),this.renderToScreen?(n.setRenderTarget(null),this.fsQuad.render(n)):(n.setRenderTarget(c),this.fsQuad.render(n)),n.setClearColor(this._oldClearColor,this.oldClearAlpha),n.autoClear=L},e.getSeperableBlurMaterial=function(n){return new h.ShaderMaterial({defines:{KERNEL_RADIUS:n,SIGMA:n},uniforms:{colorTexture:{value:null},texSize:{value:new h.Vector2(.5,.5)},direction:{value:new h.Vector2(.5,.5)}},vertexShader:`varying vec2 vUv;
2
2
  void main() {
3
3
  vUv = uv;
4
4
  gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
@@ -12,7 +12,7 @@
12
12
  }
13
13
  void main() {
14
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;
15
+ }`})},e.getCompositeMaterial=function(n){return new h.ShaderMaterial({defines:{NUM_MIPS:n},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
16
  void main() {
17
17
  vUv = uv;
18
18
  gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
@@ -37,9 +37,9 @@
37
37
  lerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +
38
38
  lerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +
39
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,`
40
+ }`})},s}(Ve.Pass);Ze.BlurDirectionX=new h.Vector2(1,0),Ze.BlurDirectionY=new h.Vector2(0,1);var ke={threshold:.2,strength:.5,radius:0},Ue=new h.MeshBasicMaterial({color:"black"}),We=new h.SpriteMaterial({color:"#000"}),Ye=function(){"use strict";function v(s,e){(0,E.Z)(this,v),this.materials={},this.bloomLayer=new h.Layers,this.active=!0,this.composerController=s,this.options=e;var r=s.renderer,n=s.renderPass,o=s.finalComposer,c=s.getSize(),t=c.width,P=c.height,L=new Ze(new h.Vector2(t,P),e.strength,e.radius,e.threshold);this.bloomPass=L;var Z=new ae.EffectComposer(r);Z.renderToScreen=!1,Z.addPass(n),Z.addPass(this.bloomPass),this.bloomComposer=Z,this.bloomLayer.set(Ae);var M=new h.ShaderMaterial({uniforms:{baseTexture:{value:null},bloomTexture:{value:Z.renderTarget2.texture}},vertexShader:He,fragmentShader:Xe,defines:{}}),F=new ue.ShaderPass(M,"baseTexture");F.needsSwap=!0,this.finalPass=F,o.addPass(F)}var f=v.prototype;return f.enable=function(){this.active||(this.finalPass.enabled=!0,this.bloomPass.enabled=!0,this.active=!0)},f.disable=function(){!this.active||(this.finalPass.enabled=!1,this.bloomPass.enabled=!1,this.active=!1)},f.render=function(e){if(!!this.active){var r=this,n=r.bloomComposer,o=r.bloomLayer,c=r.materials;e.traverse(function(t){var P=t;P.material&&o.test(P.layers)===!1&&(c[P.uuid]=P.material,P.material=P.isSprite?We:Ue)}),n.render(),e.traverse(function(t){var P=t;c[P.uuid]&&(P.material=c[P.uuid],delete c[P.uuid])})}},f.setSize=function(e,r){this.bloomComposer.setSize(e,r)},f.setGui=function(e){var r=this,n=new N.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}}}});n.showGui(e)},f.dispose=function(){this.bloomPass.dispose(),this.materials={}},v}(),Qe=require("three/examples/jsm/postprocessing/OutlinePass"),Ge={edgeStrength:3,edgeGlow:4,edgeThickness:1,pulsePeriod:0,rotate:!1,usePatternTexture:!1,visibleEdgeColor:"#5ee8e8",hiddenEdgeColor:"#190a05"},$e=function(){"use strict";function v(s,e){(0,E.Z)(this,v),this.selectedObjects=[],this.active=!0,this.composerController=s,this.options=e;var r=s.scene,n=s.camera,o=s.finalComposer,c=s.getSize(),t=c.width,P=c.height,L=new Qe.OutlinePass(new h.Vector2(t,P),r,n);L.selectedObjects=this.selectedObjects,this.outlinePass=L,o.addPass(L),this.setGui()}var f=v.prototype;return f.enable=function(){this.active||(this.outlinePass.enabled=!0,this.active=!0)},f.disable=function(){!this.active||(this.outlinePass.enabled=!1,this.active=!1)},f.setGui=function(){var e=this,r=new N.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},f.dispose=function(){this.outlinePass.dispose(),this.selectedObjects=[]},v}(),Je=d(607),l=require("three/examples/jsm/postprocessing/SSRPass"),w=require("three/examples/jsm/objects/ReflectorForSSRPass"),u={maxDistance:10,selects:!0},g={width:1,height:1,clipBias:3e-4,color:8947848,useDepthTexture:!0},b=function(){"use strict";function v(s,e){(0,E.Z)(this,v),this.selectedObjects=[],this.active=!0,this.composerController=s,this.options=e;var r=s.scene,n=s.camera,o=s.renderer,c=s.finalComposer,t=s.getSize(),P=t.width,L=t.height,Z=new l.SSRPass({renderer:o,scene:r,camera:n,width:P,height:L,groundReflector:null,selects:this.selectedObjects});this.ssrPass=Z,c.addPass(Z),this.setGui()}var f=v.prototype;return f.addGroundReflector=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=(0,a.Z)({},g,e),n=r.width,o=r.height,c=(0,Je.Z)(r,["width","height"]),t=this.composerController,P=t.scene,L=t.getSize(),Z=new h.PlaneGeometry(n,o),M=new w.ReflectorForSSRPass(Z,(0,p.Z)((0,a.Z)({},c),{textureWidth:L.width,textureHeight:L.height}));M.material.depthWrite=!1,M.rotation.x=-Math.PI/2,M.visible=!1,P.add(M),this.ssrPass.groundReflector=this.groundReflector,this.groundReflector=M},f.removeaGroundReflector=function(){this.ssrPass.groundReflector=null,this.groundReflector=void 0},f.enable=function(){this.active||(this.ssrPass.enabled=!0,this.active=!0)},f.disable=function(){!this.active||(this.ssrPass.enabled=!1,this.active=!1)},f.setSize=function(e,r){var n=this.groundReflector;n&&(n.getRenderTarget().setSize(e,r),n.resolution.set(e,r))},f.setGui=function(){var e=this,r=new N.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(n){n?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},f.dispose=function(){this.ssrPass.dispose(),this.selectedObjects=[]},v}(),i=function(){"use strict";function v(s){(0,E.Z)(this,v),this.active=!0,this.options=s;var e=s.renderer,r=s.scene,n=s.camera,o=this.createRenderTarget(),c=new ae.EffectComposer(e,o);c.setPixelRatio(e.getPixelRatio()),this.finalComposer=c,this.addRenderPasss(),this.renderer=e,this.scene=r,this.renderTarget=o,this.camera=n}var f=v.prototype;return f.createRenderTarget=function(){var e=this.options.composerParams,r=e.multisampling,n=e.type,o=e.encoding,c=this.getSize(),t={minFilter:h.LinearFilter,magFilter:h.LinearFilter,format:h.RGBAFormat,encoding:o,type:n},P;if(+h.REVISION<138&&r>0){var L=new h.WebGLMultisampleRenderTarget(c.width,c.height,t);L.samples=r,P=L}else if(+h.REVISION>=138&&r>0){var Z=new h.WebGLRenderTarget(c.width,c.height,(0,p.Z)((0,a.Z)({},t),{samples:r}));P=Z}else{var M=new h.WebGLRenderTarget(c.width,c.height,t);P=M}return P.texture.name="EffectComposer.rt1",P},f.addRenderPasss=function(){var e=this.options,r=e.scene,n=e.camera,o=new le.RenderPass(r,n);this.finalComposer.addPass(o),this.renderPass=o},f.addCopyPass=function(){var e=new ue.ShaderPass(fe.CopyShader);this.finalComposer.addPass(e),this.copyPass=e},f.addGammaCorrectionPass=function(){var e=new ue.ShaderPass(he.GammaCorrectionShader);this.finalComposer.addPass(e),this.gammaCorrectionPass=e},f.addFXAAPass=function(){var e=this.getSize(),r=e.width,n=e.height,o=new ue.ShaderPass(we.FXAAShader);this.finalComposer.addPass(o),this.fxaaPass=o,this.setFXAAPassSize(r,n)},f.addSMAAPass=function(){var e=this.getSize(),r=e.width,n=e.height,o=this.options.renderer,c=new ge.SMAAPass(r*o.getPixelRatio(),n*o.getPixelRatio());this.finalComposer.addPass(c),this.smaaPass=c},f.addSSAAPass=function(){var e=this.options,r=e.scene,n=e.camera,o=new Me.SSAARenderPass(r,n,0,0);o.unbiased=!0,o.sampleLevel=1,this.finalComposer.addPass(o),this.ssaaPass=o},f.addBloomPass=function(e){var r=new Ye(this,e);r.disable(),this.options.gui&&r.setGui(this.options.gui),this.bloomController=r},f.addOutlinePass=function(e){var r=new $e(this,e);r.disable(),this.options.gui&&r.outlineGui.showGui(this.options.gui),this.outlineController=r},f.addSSRPass=function(e){var r=new b(this,e);r.disable(),this.options.gui&&r.ssrGui.showGui(this.options.gui),this.ssrController=r},f.getSize=function(){var e=this.options.renderer;return e.getSize(new h.Vector2)},f.enable=function(){this.active||(this.active=!0)},f.disable=function(){!this.active||(this.active=!1)},f.checkCopyPass=function(){var e=this,r=this.finalComposer.passes.some(function(n){return n!==e.renderPass&&n!==e.copyPass?n.enabled:!1});r&&this.copyPass?this.copyPass.enabled=!1:!r&&this.copyPass?this.copyPass.enabled=!0:!r&&!this.copyPass&&this.addCopyPass()},f.setSize=function(e,r){var n,o;this.finalComposer.setSize(e,r),(n=this.bloomController)===null||n===void 0||n.setSize(e,r),(o=this.ssrController)===null||o===void 0||o.setSize(e,r),this.setFXAAPassSize(e,r)},f.setFXAAPassSize=function(e,r){if(!!this.fxaaPass){var n=this.options.renderer,o=n.getPixelRatio();this.fxaaPass.material.uniforms.resolution.value.x=1/(e*o),this.fxaaPass.material.uniforms.resolution.value.y=1/(r*o)}},f.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()}},f.dispose=function(){var e,r,n;(e=this.bloomController)===null||e===void 0||e.dispose(),(r=this.outlineController)===null||r===void 0||r.dispose(),(n=this.ssrController)===null||n===void 0||n.dispose(),this.finalComposer.passes.forEach(function(o){var c,t,P;(c=o.fsQuad)===null||c===void 0||c.dispose(),(t=o.fsQuad)===null||t===void 0||(P=t.material)===null||P===void 0||P.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},v}(),y=function(){"use strict";function v(s){(0,E.Z)(this,v),this.raycaster=new h.Raycaster,this.installPlugins=new Map,this.event=new ee.EventEmitter,this.clock=new h.Clock,this.options=J()(v.options,s,{isMergeableObject:R.isPlainObject});var e=this.options,r=e.container,n=e.stats,o=e.gui;if(o){var c=new(K());c.open(!1),this.gui=c}if(n){var t=new(se());t.showPanel(0),t.dom.style.position="absolute",r.appendChild(t.dom),this.stats=t}this.init(),this.initComposer(),this.initCSSRenderer(),this.initControl(),this.clock.getDelta(),this.clock.getElapsedTime()}var f=v.prototype;return f.use=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];if(this.installPlugins.has(e))console.log("plugin already installed");else if(typeof e.install=="function"){var c;(c=e).install.apply(c,[this].concat((0,A.Z)(n))),this.installPlugins.set(e,!0)}},f.init=function(){var e=this,r=this.options,n=r.container,o=r.isdev,c=r.axesHelper,t=r.renderer,P=r.scene,L=r.camera,Z=this.getSize(),M=Z.width,F=Z.height,Y=new x({isdev:o,width:M,height:F,cameraParams:L});this.gui&&Y.setGui(this.gui);var Q=Y.camera,ne=new H({camera:Q,sceneParams:P}),re=ne.scene,de=new _({width:M,height:F,scene:re,camera:Q,isdev:o,rendererParams:(0,p.Z)((0,a.Z)({},t),{outputEncoding:h.LinearEncoding,antialias:!1})});this.gui&&de.setGui(this.gui);var ce=de.renderer;c&&ne.addAxesHelper(),this.sceneController=ne,this.rendererController=de,this.cameraController=Y,n.appendChild(ce.domElement);var ye=new ResizeObserver(function(je){var Le=!0,ze=!1,ve=void 0;try{for(var _e=je[Symbol.iterator](),Pe;!(Le=(Pe=_e.next()).done);Le=!0){var be=Pe.value,Oe=be.contentRect;e.handeleResize(Oe.width,Oe.height)}}catch(Ee){ze=!0,ve=Ee}finally{try{!Le&&_e.return!=null&&_e.return()}finally{if(ze)throw ve}}});ye.observe(n),this.resizeObserver=ye},f.initComposer=function(){var e=this.options,r=e.bloom,n=e.outline,o=e.ssr,c=e.renderer,t=e.bloomParams,P=e.outlineParams,L=e.ssrParams,Z=e.multisampling,M=c.antialias;M==="msaa"&&!Be&&(M=!1,console.warn("MSAA is not supported on this browser"));var F=new i({renderer:this.renderer,scene:this.scene,camera:this.camera,gui:this.gui,composerParams:{multisampling:M==="msaa"?Z:0,type:h.UnsignedByteType,encoding:c.outputEncoding}});this.composerController=F,M==="ssaa"&&F.addSSAAPass(),o&&F.addSSRPass(L),r&&F.addBloomPass(t),n&&F.addOutlinePass(P),c.outputEncoding===h.sRGBEncoding&&F.addGammaCorrectionPass(),M==="fxaa"?F.addFXAAPass():M==="smaa"&&F.addSMAAPass(),F.checkCopyPass(),this.event.on("passcheck",function(){F.checkCopyPass()})},f.initCSSRenderer=function(){var e=this.options,r=e.container,n=e.css2DRenderer,o=e.css3DRenderer,c=e.css2DRendererParams,t=e.css3DRendererParams;if(n||o){var P=new I(r);n&&P.addRenderer("css2d",c),o&&P.addRenderer("css3d",t),this.cssRendererController=P}},f.initControl=function(){var e=this.options,r=e.control,n=e.mapControl,o=e.controlParams;if(r){var c=new pe({camera:this.camera,controlParams:{domElement:(o==null?void 0:o.domElement)||this.renderer.domElement},mapControl:n});this.controlController=c}},f.getSize=function(){var e=this.options.container;return{width:e.offsetWidth,height:e.offsetHeight}},f.handeleResize=function(e,r){var n=this,o=n.rendererController,c=n.cameraController,t=n.composerController,P=n.cssRendererController;c==null||c.setSize(e,r),o==null||o.setSize(e,r),t==null||t.setSize(e,r),P==null||P.setSize(e,r),this.installPlugins.forEach(function(L,Z){var M;(M=Z.resize)===null||M===void 0||M.call(Z,{width:e,height:r})}),this.event.emit("resize",{width:e,height:r})},f.pick=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,o=this,c=o.raycaster,t=o.options,P=t.container,L=new h.Vector2,Z=P.getBoundingClientRect();if(L.x=(e.clientX-Z.left)/(Z.right-Z.left)*2-1,L.y=-((e.clientY-Z.top)/(Z.bottom-Z.top))*2+1,this.camera&&this.scene){c.setFromCamera(L,this.camera);var M=c.intersectObjects(r||this.scene.children,n);if(M.length)return{object:M[0].object,intersects:M}}},f.render=function(){var e,r,n,o,c=this,t=c.renderer,P=c.scene,L=c.camera,Z=c.clock;if(!(!t||!P||!L||this.options.staticRender&&!this.cameraController.checkCameraChange())){var M=Z.getDelta(),F=Z.getElapsedTime();if(t.clear(),B().update(),(e=this.controlController)===null||e===void 0||e.update(),this.installPlugins.forEach(function(Q,ne){var re;(re=ne.update)===null||re===void 0||re.call(ne,M,F)}),!((r=this.composerController)===null||r===void 0)&&r.active)this.composerController.render();else{var Y;(Y=this.rendererController)===null||Y===void 0||Y.render()}(n=this.cssRendererController)===null||n===void 0||n.render(P,L),(o=this.stats)===null||o===void 0||o.update(),this.event.emit("render",{delta:M,elapsed:F})}},f.start=function(){this.renderer.setAnimationLoop(this.render.bind(this)),this.event.emit("start")},f.stop=function(){this.renderer.setAnimationLoop(null),this.event.emit("stop")},f.dispose=function(){var e,r,n,o,c,t,P;this.stop(),B().removeAll(),this.handeleResize(0,0),(e=this.resizeObserver)===null||e===void 0||e.unobserve(this.options.container),this.installPlugins.forEach(function(L,Z){var M;(M=Z.dispose)===null||M===void 0||M.call(Z)}),(r=this.controlController)===null||r===void 0||r.dispose(),(n=this.cssRendererController)===null||n===void 0||n.dispose(),(o=this.sceneController)===null||o===void 0||o.dispose(),(c=this.composerController)===null||c===void 0||c.dispose(),(t=this.rendererController)===null||t===void 0||t.dispose(),this.controlController=void 0,this.cssRendererController=void 0,(P=this.gui)===null||P===void 0||P.destroy(),this.event.removeAllListeners(),this.installPlugins.clear()},(0,j.Z)(v,[{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}}]),v}();y.options={isdev:Te,stats:Te,gui:Te,axesHelper:Te,control:Te,renderer:(0,p.Z)((0,a.Z)({},k),{antialias:Be?"msaa":"smaa"}),staticRender:!1,multisampling:8,scene:U,camera:m,bloom:!1,bloomParams:ke,outline:!1,outlineParams:Ge,css2DRenderer:!1,ssr:!1,ssrParams:u,css2DRendererParams:(0,a.Z)({},W),css3DRenderer:!1,css3DRendererParams:(0,a.Z)({},W)};var C=d(701)},695:function(V,T,d){"use strict";d.d(T,{Z:function(){return E}});function E(j){if(j.geometry&&j.geometry.dispose(),j.material){var a=Array.isArray(j.material)?j.material:[j.material];a.forEach(function(p){var A,z,B,h,ee,$,J,te,se,oe,K,N,G;(A=p.map)===null||A===void 0||A.dispose(),(z=p.lightMap)===null||z===void 0||z.dispose(),(B=p.bumpMap)===null||B===void 0||B.dispose(),(h=p.normalMap)===null||h===void 0||h.dispose(),(ee=p.specularMap)===null||ee===void 0||ee.dispose(),($=p.envMap)===null||$===void 0||$.dispose(),(J=p.alphaMap)===null||J===void 0||J.dispose(),(te=p.aoMap)===null||te===void 0||te.dispose(),(se=p.displacementMap)===null||se===void 0||se.dispose(),(oe=p.emissiveMap)===null||oe===void 0||oe.dispose(),(K=p.gradientMap)===null||K===void 0||K.dispose(),(N=p.metalnessMap)===null||N===void 0||N.dispose(),(G=p.roughnessMap)===null||G===void 0||G.dispose(),p.dispose()})}}},519:function(V,T,d){"use strict";d.d(T,{disposeMesh:function(){return p.Z},isPlainObject:function(){return B.Z}});var E=d(666),j=d.n(E),a=null,p=d(695),A=d(644);function z(K){if(K.material){var N=Array.isArray(K.material)?K.material:[K.material];N.forEach(function(G){var k,_;(k=G.color)===null||k===void 0||k.convertSRGBToLinear(),(_=G.emissive)===null||_===void 0||_.convertSRGBToLinear(),G.map&&(G.map.encoding=THREE.sRGBEncoding),G.emissiveMap&&(G.emissiveMap.encoding=THREE.sRGBEncoding)})}}var B=d(738),h=d(568),ee=d(924),$=require("idb-keyval"),J=d(484),te=null,se=null,oe=function(){var K=(0,h.Z)(j().mark(function N(G,k){var _,m,x,R,U,H;return j().wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return _=k.version,ie.next=4,(0,$.get)(G);case 4:if(x=ie.sent,!(x&&x[_])){ie.next=9;break}m=x[_],ie.next=15;break;case 9:return ie.next=11,(0,J.Z)(fetch(G).then(function(pe){if(pe.ok)return pe.blob();throw new Error}));case 11:R=ie.sent,U=R.res,H=R.err,H||(m=U,(0,$.set)(G,(0,ee.Z)({},_,U)));case 15:return ie.abrupt("return",m?{url:URL.createObjectURL(m)}:{url:G});case 16:case"end":return ie.stop()}},N)}));return function(G,k){return K.apply(this,arguments)}}()},738:function(V,T,d){"use strict";d.d(T,{Z:function(){return j}});function E(a){return Object.prototype.toString.call(a)==="[object Object]"}function j(a){if(E(a)===!1)return!1;var p=a.constructor;if(p===void 0)return!0;var A=p.prototype;return!(E(A)===!1||A.hasOwnProperty("isPrototypeOf")===!1)}},282:function(V,T,d){"use strict";d.d(T,{Z:function(){return j}});var E=d(484);function j(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A={};return A.promise=new Promise(function(z,B){A.resolve=z,A.reject=B}),a&&(A.promise=(0,E.Z)(A.promise,p)),A}},484:function(V,T,d){"use strict";d.d(T,{Z:function(){return j}});var E=d(42);function j(a){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return a.then(function(A){return(0,E.Z)({err:null,res:A},p)}).catch(function(A){return(0,E.Z)({err:A,res:void 0},p)})}},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,T,d){"use strict";d.d(T,{Z:function(){return E}});function E(j,a){(a==null||a>j.length)&&(a=j.length);for(var p=0,A=new Array(a);p<a;p++)A[p]=j[p];return A}},982:function(V,T,d){"use strict";d.d(T,{Z:function(){return j}});var E=d(943);function j(a){if(Array.isArray(a))return(0,E.Z)(a)}},111:function(V,T,d){"use strict";d.d(T,{Z:function(){return E}});function E(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}},568:function(V,T,d){"use strict";d.d(T,{Z:function(){return j}});function E(a,p,A,z,B,h,ee){try{var $=a[h](ee),J=$.value}catch(te){A(te);return}$.done?p(J):Promise.resolve(J).then(z,B)}function j(a){return function(){var p=this,A=arguments;return new Promise(function(z,B){var h=a.apply(p,A);function ee(J){E(h,z,B,ee,$,"next",J)}function $(J){E(h,z,B,ee,$,"throw",J)}ee(void 0)})}}},438:function(V,T,d){"use strict";d.d(T,{Z:function(){return E}});function E(j,a){if(!(j instanceof a))throw new TypeError("Cannot call a class as a function")}},951:function(V,T,d){"use strict";d.d(T,{Z:function(){return j}});function E(a,p){for(var A=0;A<p.length;A++){var z=p[A];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(a,z.key,z)}}function j(a,p,A){return p&&E(a.prototype,p),A&&E(a,A),a}},485:function(V,T,d){"use strict";d.d(T,{Z:function(){return z}});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(B){return!1}}var j=d(662),a=d(111);function p(B){return B&&B.constructor===Symbol?"symbol":typeof B}function A(B,h){return h&&(p(h)==="object"||typeof h=="function")?h:(0,a.Z)(B)}function z(B){var h=E();return function(){var $=(0,j.Z)(B),J;if(h){var te=(0,j.Z)(this).constructor;J=Reflect.construct($,arguments,te)}else J=$.apply(this,arguments);return A(this,J)}}},924:function(V,T,d){"use strict";d.d(T,{Z:function(){return E}});function E(j,a,p){return a in j?Object.defineProperty(j,a,{value:p,enumerable:!0,configurable:!0,writable:!0}):j[a]=p,j}},662:function(V,T,d){"use strict";d.d(T,{Z:function(){return j}});function E(a){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)},E(a)}function j(a){return E(a)}},668:function(V,T,d){"use strict";d.d(T,{Z:function(){return j}});var E=d(998);function j(a,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(p&&p.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),p&&(0,E.Z)(a,p)}},375:function(V,T,d){"use strict";d.d(T,{Z:function(){return E}});function E(j){if(typeof Symbol!="undefined"&&j[Symbol.iterator]!=null||j["@@iterator"]!=null)return Array.from(j)}},270:function(V,T,d){"use strict";d.d(T,{Z:function(){return E}});function E(){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,T,d){"use strict";d.d(T,{Z:function(){return j}});var E=d(924);function j(a){for(var p=1;p<arguments.length;p++){var A=arguments[p]!=null?arguments[p]:{},z=Object.keys(A);typeof Object.getOwnPropertySymbols=="function"&&(z=z.concat(Object.getOwnPropertySymbols(A).filter(function(B){return Object.getOwnPropertyDescriptor(A,B).enumerable}))),z.forEach(function(B){(0,E.Z)(a,B,A[B])})}return a}},396:function(V,T,d){"use strict";d.d(T,{Z:function(){return j}});function E(a,p){var A=Object.keys(a);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(a);p&&(z=z.filter(function(B){return Object.getOwnPropertyDescriptor(a,B).enumerable})),A.push.apply(A,z)}return A}function j(a,p){return p=p!=null?p:{},Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(p)):E(Object(p)).forEach(function(A){Object.defineProperty(a,A,Object.getOwnPropertyDescriptor(p,A))}),a}},607:function(V,T,d){"use strict";d.d(T,{Z:function(){return j}});function E(a,p){if(a==null)return{};var A={},z=Object.keys(a),B,h;for(h=0;h<z.length;h++)B=z[h],!(p.indexOf(B)>=0)&&(A[B]=a[B]);return A}function j(a,p){if(a==null)return{};var A=E(a,p),z,B;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(a);for(B=0;B<h.length;B++)z=h[B],!(p.indexOf(z)>=0)&&(!Object.prototype.propertyIsEnumerable.call(a,z)||(A[z]=a[z]))}return A}},998:function(V,T,d){"use strict";d.d(T,{Z:function(){return j}});function E(a,p){return E=Object.setPrototypeOf||function(z,B){return z.__proto__=B,z},E(a,p)}function j(a,p){return E(a,p)}},342:function(V,T,d){"use strict";d.d(T,{Z:function(){return A}});var E=d(982),j=d(375),a=d(270),p=d(566);function A(z){return(0,E.Z)(z)||(0,j.Z)(z)||(0,p.Z)(z)||(0,a.Z)()}},566:function(V,T,d){"use strict";d.d(T,{Z:function(){return j}});var E=d(943);function j(a,p){if(!!a){if(typeof a=="string")return(0,E.Z)(a,p);var A=Object.prototype.toString.call(a).slice(8,-1);if(A==="Object"&&a.constructor&&(A=a.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,E.Z)(a,p)}}}},et={};function q(V){var T=et[V];if(T!==void 0)return T.exports;var d=et[V]={exports:{}};return nt[V](d,d.exports,q),d.exports}(function(){q.n=function(V){var T=V&&V.__esModule?function(){return V.default}:function(){return V};return q.d(T,{a:T}),T}})(),function(){q.d=function(V,T){for(var d in T)q.o(T,d)&&!q.o(V,d)&&Object.defineProperty(V,d,{enumerable:!0,get:T[d]})}}(),function(){q.o=function(V,T){return Object.prototype.hasOwnProperty.call(V,T)}}(),function(){q.r=function(V){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(V,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(V,"__esModule",{value:!0})}}(),function(){q.p="/"}();var Ie={};(function(){"use strict";q.r(Ie),q.d(Ie,{ConicPolygon:function(){return Qe},ExtrudePolygon:function(){return Je},Image:function(){return ee},Line:function(){return me},MeshLine:function(){return x},MeshLineMaterial:function(){return H},MeshLineRaycast:function(){return R},Node:function(){return G},Text:function(){return A},Video:function(){return K}});var V=q(438),T=q(668),d=q(42),E=q(396),j=q(485),a=q(644),p=q(701),A=function(l){"use strict";(0,T.Z)(u,l);var w=(0,j.Z)(u);function u(b){(0,V.Z)(this,u);var i;return i=w.call(this),i.width=0,i.canvas=document.createElement("canvas"),i.options=(0,d.Z)({},{scale:.5,fontSize:28,fontFamily:"system-ui,-apple-system,BlinkMacSystemFont,sans-serif",fontWeight:"normal",flipX:!1,sprite:!1,sizeAttenuation:!0},b),i}var g=u.prototype;return g.create=function(){var i=this.options,y=i.position,C=i.lookAt,v=i.sprite,f=i.text,s=i.sizeAttenuation;if(v){var e=new a.Sprite(new a.SpriteMaterial({transparent:!0,sizeAttenuation:s}));this.object3d=e}else{var r=new a.MeshBasicMaterial({side:a.DoubleSide,transparent:!0}),n=new a.PlaneGeometry(1,1,1,1);this.createMesh(n,r)}this.object3d.position.copy(y),C&&this.object3d.lookAt(C),this.setText(f)},g.setText=function(i,y){var C=(0,d.Z)((0,E.Z)((0,d.Z)({},this.options),{text:i}),y||{}),v=C.text,f=C.fontSize,s=C.fontFamily,e=C.fontWeight,r=C.flipX,n=C.scale,o=this.canvas;o.width=f*v.length*2,o.height=f;var c=o.getContext("2d");c.font="".concat(e," ").concat(f,"px/1 ").concat(s);var t=c.measureText(v).width;o.width=t,this.width=t,c=o.getContext("2d"),c.clearRect(0,0,o.width,o.height),r&&c.scale(-1,1),c.font="".concat(e," ").concat(f,"px/1 ").concat(s),c.textBaseline="middle",c.fillStyle="#ffffff",c.fillText(v,r?t*-1:0,o.height/2),c.restore();var P=new a.Texture(o);P.anisotropy=16,P.needsUpdate=!0;var L=this.object3d;L.material.map&&L.material.map.dispose(),L.material.map=P,L.material.needsUpdate=!0,L.scale.set(P.image.width*n,P.image.height*n,1)},u}(p.ZP),z=q(568),B=q(666),h=q.n(B),ee=function(l){"use strict";(0,T.Z)(u,l);var w=(0,j.Z)(u);function u(b){(0,V.Z)(this,u);var i;return i=w.call(this),i.options=b,i}var g=u.prototype;return g.getMaterial=function(){var i=this;return(0,z.Z)(h().mark(function y(){var C,v,f,s,e,r,n,o,c,t;return h().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return C=i.options,v=C.transparent,f=C.blending,s=C.src,e=C.depthWrite,r=C.alphaTest,n=C.sprite,o=C.sizeAttenuation,L.next=3,new a.TextureLoader().loadAsync(s);case 3:return c=L.sent,t=n?new a.SpriteMaterial({map:c,transparent:v!=null?v:!1,blending:f!=null?f:a.NormalBlending,depthWrite:e!=null?e:!0,alphaTest:r!=null?r:0,sizeAttenuation:o!=null?o:!0}):new a.MeshBasicMaterial({map:c,transparent:v!=null?v:!1,blending:f!=null?f:a.NormalBlending,depthWrite:e!=null?e:!0,alphaTest:r!=null?r:0}),L.abrupt("return",t);case 6:case"end":return L.stop()}},y)}))()},g.create=function(){var i=this;return(0,z.Z)(h().mark(function y(){var C,v,f,s,e,r,n,o;return h().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(C=i.options,v=C.scale,f=C.position,s=C.src,e=C.cache,r=C.sprite,!(e&&!e.get(s))){t.next=7;break}return e.init(s),t.next=5,i.getMaterial();case 5:n=t.sent,e.set(s,n);case 7:if(!e){t.next=13;break}return t.next=10,e.get(s);case 10:t.t0=t.sent,t.next=16;break;case 13:return t.next=15,i.getMaterial();case 15:t.t0=t.sent;case 16:o=t.t0,i.texture=o.map,r?i.createSprite(o):i.createMesh(new a.PlaneBufferGeometry(1,1),o),v&&i.object3d.scale.set(o.map.image.width*v,o.map.image.height*v,1),f&&i.object3d.position.copy(f);case 21:case"end":return t.stop()}},y)}))()},u}(p.ZP),$=q(662);function J(l,w){for(;!Object.prototype.hasOwnProperty.call(l,w)&&(l=(0,$.Z)(l),l!==null););return l}function te(l,w,u){return typeof Reflect!="undefined"&&Reflect.get?te=Reflect.get:te=function(b,i,y){var C=J(b,i);if(!!C){var v=Object.getOwnPropertyDescriptor(C,i);return v.get?v.get.call(y||b):v.value}},te(l,w,u)}function se(l,w,u){return te(l,w,u)}var oe=q(282),K=function(l){"use strict";(0,T.Z)(u,l);var w=(0,j.Z)(u);function u(b){(0,V.Z)(this,u);var i;return i=w.call(this),i.options=(0,d.Z)({},{autoPlay:!0,loop:!0},b),i}var g=u.prototype;return g.getMaterial=function(){var i=this.options,y=i.src,C=i.transparent,v=i.blending,f=i.depthWrite,s=i.format,e=i.autoPlay,r=i.loop,n=i.alphaTest,o=i.sprite,c=(0,oe.Z)(),t=document.createElement("video");return t.addEventListener("loadedmetadata",function(){var P=new a.VideoTexture(t);P.format=s!=null?s:a.RGBAFormat,P.needsUpdate=!0;var L=o?new a.SpriteMaterial({map:P,transparent:C!=null?C:!1,blending:v!=null?v:a.NormalBlending,depthWrite:f!=null?f:!0,alphaTest:n!=null?n:0}):new a.MeshBasicMaterial({map:P,transparent:C!=null?C:!1,blending:v!=null?v:a.NormalBlending,depthWrite:f!=null?f:!0,alphaTest:n!=null?n:0});c.resolve(L)},!1),t.src=y,t.muted=!0,t.autoplay=e,t.loop=r,t.preload="auto",c.promise},g.create=function(){var i=this;return(0,z.Z)(h().mark(function y(){var C,v,f,s,e,r,n,o;return h().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(C=i.options,v=C.scale,f=C.position,s=C.src,e=C.cache,r=C.sprite,!(e&&!e.get(s))){t.next=7;break}return e.init(s),t.next=5,i.getMaterial();case 5:n=t.sent,e.set(s,n);case 7:if(!e){t.next=13;break}return t.next=10,e.get(s);case 10:t.t0=t.sent,t.next=16;break;case 13:return t.next=15,i.getMaterial();case 15:t.t0=t.sent;case 16:o=t.t0,i.video=o.map.image,r?i.createSprite(o):i.createMesh(new a.PlaneBufferGeometry(1,1),o),v&&i.object3d.scale.set(i.video.videoWidth*v,i.video.videoHeight*v,1),f&&i.object3d.position.copy(f);case 21:case"end":return t.stop()}},y)}))()},g.render=function(){var i=this.options.autoPlay;i&&this.video.play()},g.dispose=function(){this.video.pause(),this.video.src="",this.video.load(),se((0,$.Z)(u.prototype),"dispose",this).call(this)},u}(p.ZP),N=function(l){"use strict";(0,T.Z)(u,l);var w=(0,j.Z)(u);function u(b){(0,V.Z)(this,u);var i;return i=w.call(this),i.options=(0,d.Z)({},b),i}var g=u.prototype;return g.create=function(){var i=this.options,y=i.position,C=i.children,v=i.onClick,f=i.zIndexFix,s=document.createElement("div");s.appendChild(C),this.createCSS2DObject(s),y&&this.object3d.position.copy(y),v&&s.addEventListener("click",v),f&&(this.object3d.userData.zIndexFix=f)},g.getMaterial=function(i){return(0,z.Z)(h().mark(function y(){var C,v,f,s;return h().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return C=document.createElement("canvas"),C.width=256,C.height=256,v=C.getContext("2d"),v.fillStyle="#ff0000",v.fillRect(0,0,256,256),f=new a.CanvasTexture(C),s=new a.SpriteMaterial({map:f,opacity:i?1:0,transparent:!0,alphaTest:.1,sizeAttenuation:!1}),r.abrupt("return",s);case 9:case"end":return r.stop()}},y)}))()},g.createPickObject=function(i){var y=i.show,C=y===void 0?!1:y,v=i.scale,f=v===void 0?new a.Vector3(1,1,1):v,s=i.position,e=s===void 0?new a.Vector3(0,0,0):s,r=i.cache,n=this;return(0,z.Z)(h().mark(function o(){var c,t,P,L;return h().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(c="node-create-pick-object",!(r&&!r.get(c))){M.next=7;break}return r.init(c),M.next=5,n.getMaterial(C);case 5:t=M.sent,r.set(c,t);case 7:if(!r){M.next=13;break}return M.next=10,r.get(c);case 10:M.t0=M.sent,M.next=16;break;case 13:return M.next=15,n.getMaterial(C);case 15:M.t0=M.sent;case 16:P=M.t0,L=new a.Sprite(P),L.scale.set(P.map.image.width*f.x,P.map.image.height*f.y,1),L.position.copy(e),n.add(L),n.pickObject=L;case 22:case"end":return M.stop()}},o)}))()},g.dispose=function(){var i=this.options.onClick;if(i){var y;(y=this.object3d.element)===null||y===void 0||y.removeEventListener("click",i)}se((0,$.Z)(u.prototype),"dispose",this).call(this)},u}(p.ZP),G=N,k=q(111),_=`
41
+ `.concat(a.ShaderChunk.logdepthbuf_pars_vertex,`
42
+ `).concat(a.ShaderChunk.fog_pars_vertex,`
43
43
  attribute vec3 previous;
44
44
  attribute vec3 next;
45
45
  attribute float side;
@@ -130,13 +130,13 @@
130
130
  finalPosition.xy+=offset.xy;
131
131
 
132
132
  gl_Position=finalPosition;
133
- `).concat(i.ShaderChunk.logdepthbuf_vertex,`
133
+ `).concat(a.ShaderChunk.logdepthbuf_vertex,`
134
134
  vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );
135
- `).concat(i.ShaderChunk.fog_vertex,`
135
+ `).concat(a.ShaderChunk.fog_vertex,`
136
136
  }
137
- `),v=`
138
- `.concat(i.ShaderChunk.fog_pars_fragment,`
139
- `).concat(i.ShaderChunk.logdepthbuf_pars_fragment,`
137
+ `),m=`
138
+ `.concat(a.ShaderChunk.fog_pars_fragment,`
139
+ `).concat(a.ShaderChunk.logdepthbuf_pars_fragment,`
140
140
 
141
141
 
142
142
  uniform sampler2D map;
@@ -156,7 +156,7 @@ varying vec4 vColor;
156
156
  varying float vCounters;
157
157
 
158
158
  void main() {
159
- `).concat(i.ShaderChunk.logdepthbuf_fragment,`
159
+ `).concat(a.ShaderChunk.logdepthbuf_fragment,`
160
160
  vec4 c = vColor;
161
161
  if( useMap == 1. ) c *= texture2D( map, vUV * repeat );
162
162
  if( useAlphaMap == 1. ) c.a *= texture2D( alphaMap, vUV * repeat ).a;
@@ -166,6 +166,6 @@ void main() {
166
166
  }
167
167
  gl_FragColor = c;
168
168
  gl_FragColor.a *= step(vCounters, visibility);
169
- `).concat(i.ShaderChunk.fog_fragment,`
169
+ `).concat(a.ShaderChunk.fog_fragment,`
170
170
  }
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})();
171
+ `),x=function(l){"use strict";(0,T.Z)(u,l);var w=(0,j.Z)(u);function u(){(0,V.Z)(this,u);var g;return g=w.call(this),g.isMeshLine=!0,g.type="MeshLine",g.positions=[],g.previous=[],g.next=[],g.side=[],g.width=[],g.indices_array=[],g.uvs=[],g.counters=[],g._points=[],g._geom=null,g.widthCallback=null,g.matrixWorld=new a.Matrix4,Object.defineProperties((0,k.Z)(g),{geometry:{enumerable:!0,get:function(){return this}},geom:{enumerable:!0,get:function(){return this._geom},set:function(i){this.setGeometry(i,this.widthCallback)}},points:{enumerable:!0,get:function(){return this._points},set:function(i){this.setPoints(i,this.widthCallback)}}}),g}return u}(a.BufferGeometry);x.prototype.setMatrixWorld=function(l){this.matrixWorld=l},x.prototype.setGeometry=function(l,w){this._geometry=l,this.setPoints(l.getAttribute("position").array,w)},x.prototype.setPoints=function(l,w){if(!(l instanceof Float32Array)&&!(l instanceof Array)){console.error("ERROR: The BufferArray of points is not instancied correctly.");return}if(this._points=l,this.widthCallback=w,this.positions=[],this.counters=[],l.length&&l[0]instanceof a.Vector3)for(var u=0;u<l.length;u++){var g=l[u],b=u/l.length;this.positions.push(g.x,g.y,g.z),this.positions.push(g.x,g.y,g.z),this.counters.push(b),this.counters.push(b)}else for(var u=0;u<l.length;u+=3){var b=u/l.length;this.positions.push(l[u],l[u+1],l[u+2]),this.positions.push(l[u],l[u+1],l[u+2]),this.counters.push(b),this.counters.push(b)}this.process()};function R(l,w){var u=new a.Matrix4,g=new a.Ray,b=new a.Sphere,i=new a.Vector3,y=this.geometry;if(y.boundingSphere||y.computeBoundingSphere(),b.copy(y.boundingSphere),b.applyMatrix4(this.matrixWorld),l.ray.intersectSphere(b,i)!==!1){u.copy(this.matrixWorld).invert(),g.copy(l.ray).applyMatrix4(u);var C=new a.Vector3,v=new a.Vector3,f=new a.Vector3,s=this instanceof a.LineSegments?2:1,e=y.index,r=y.attributes;if(e!==null)for(var n=e.array,o=r.position.array,c=r.width.array,t=0,P=n.length-1;t<P;t+=s){var L=n[t],Z=n[t+1];C.fromArray(o,L*3),v.fromArray(o,Z*3);var M=c[Math.floor(t/3)]!==void 0?c[Math.floor(t/3)]:1,F=l.params.Line.threshold+this.material.lineWidth*M/2,Y=F*F,Q=g.distanceSqToSegment(C,v,i,f);if(!(Q>Y)){i.applyMatrix4(this.matrixWorld);var ne=l.ray.origin.distanceTo(i);ne<l.near||ne>l.far||(w.push({distance:ne,point:f.clone().applyMatrix4(this.matrixWorld),index:t,face:null,faceIndex:null,object:this}),t=P)}}}}x.prototype.raycast=R,x.prototype.compareV3=function(l,w){var u=l*6,g=w*6;return this.positions[u]===this.positions[g]&&this.positions[u+1]===this.positions[g+1]&&this.positions[u+2]===this.positions[g+2]},x.prototype.copyV3=function(l){var w=l*6;return[this.positions[w],this.positions[w+1],this.positions[w+2]]},x.prototype.process=function(){var l=this.positions.length/6;this.previous=[],this.next=[],this.side=[],this.width=[],this.indices_array=[],this.uvs=[];var w,u;this.compareV3(0,l-1)?u=this.copyV3(l-2):u=this.copyV3(0),this.previous.push(u[0],u[1],u[2]),this.previous.push(u[0],u[1],u[2]);for(var g=0;g<l;g++){if(this.side.push(1),this.side.push(-1),this.widthCallback?w=this.widthCallback(g/(l-1)):w=1,this.width.push(w),this.width.push(w),this.uvs.push(g/(l-1),0),this.uvs.push(g/(l-1),1),g<l-1){u=this.copyV3(g),this.previous.push(u[0],u[1],u[2]),this.previous.push(u[0],u[1],u[2]);var b=g*2;this.indices_array.push(b,b+1,b+2),this.indices_array.push(b+2,b+1,b+3)}g>0&&(u=this.copyV3(g),this.next.push(u[0],u[1],u[2]),this.next.push(u[0],u[1],u[2]))}this.compareV3(l-1,0)?u=this.copyV3(1):u=this.copyV3(l-1),this.next.push(u[0],u[1],u[2]),this.next.push(u[0],u[1],u[2]),!this._attributes||this._attributes.position.count!==this.positions.length?this._attributes={position:new a.BufferAttribute(new Float32Array(this.positions),3),previous:new a.BufferAttribute(new Float32Array(this.previous),3),next:new a.BufferAttribute(new Float32Array(this.next),3),side:new a.BufferAttribute(new Float32Array(this.side),1),width:new a.BufferAttribute(new Float32Array(this.width),1),uv:new a.BufferAttribute(new Float32Array(this.uvs),2),index:new a.BufferAttribute(new Uint16Array(this.indices_array),1),counters:new a.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 U(l,w,u,g,b){var i;if(l=l.subarray||l.slice?l:l.buffer,u=u.subarray||u.slice?u:u.buffer,l=w?l.subarray?l.subarray(w,b&&w+b):l.slice(w,b&&w+b):l,u.set)u.set(l,g);else for(i=0;i<l.length;i++)u[i+g]=l[i];return u}x.prototype.advance=function(l){var w=this._attributes.position.array,u=this._attributes.previous.array,g=this._attributes.next.array,b=w.length;U(w,0,u,0,b),U(w,6,w,0,b-6),w[b-6]=l.x,w[b-5]=l.y,w[b-4]=l.z,w[b-3]=l.x,w[b-2]=l.y,w[b-1]=l.z,U(w,6,g,0,b-6),g[b-6]=l.x,g[b-5]=l.y,g[b-4]=l.z,g[b-3]=l.x,g[b-2]=l.y,g[b-1]=l.z,this._attributes.position.needsUpdate=!0,this._attributes.previous.needsUpdate=!0,this._attributes.next.needsUpdate=!0},a.ShaderChunk.meshline_vert=_,a.ShaderChunk.meshline_frag=m;var H=function(l){"use strict";(0,T.Z)(u,l);var w=(0,j.Z)(u);function u(g){(0,V.Z)(this,u);var b;return b=w.call(this,{uniforms:Object.assign({},a.UniformsLib.fog,{lineWidth:{value:1},map:{value:null},useMap:{value:0},alphaMap:{value:null},useAlphaMap:{value:0},color:{value:new a.Color(16777215)},opacity:{value:1},resolution:{value:new a.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 a.Vector2(1,1)},offset:{value:new a.Vector2(1,1)},lineLightAnimation:{value:1},time:{value:0},size:{value:300},speed:{value:.3},lightWidth:{value:.1},uCenter:{value:new a.Vector2(0,0)},lightColor:{value:new a.Color(16777215)}}),vertexShader:a.ShaderChunk.meshline_vert,fragmentShader:a.ShaderChunk.meshline_frag}),b.isMeshLineMaterial=!0,b.type="MeshLineMaterial",Object.defineProperties((0,k.Z)(b),{lineWidth:{enumerable:!0,get:function(){return this.uniforms.lineWidth.value},set:function(y){this.uniforms.lineWidth.value=y}},lineLightAnimation:{enumerable:!0,get:function(){return this.uniforms.lineLightAnimation.value},set:function(y){this.uniforms.lineLightAnimation.value=y}},map:{enumerable:!0,get:function(){return this.uniforms.map.value},set:function(y){this.uniforms.map.value=y}},useMap:{enumerable:!0,get:function(){return this.uniforms.useMap.value},set:function(y){this.uniforms.useMap.value=y}},alphaMap:{enumerable:!0,get:function(){return this.uniforms.alphaMap.value},set:function(y){this.uniforms.alphaMap.value=y}},useAlphaMap:{enumerable:!0,get:function(){return this.uniforms.useAlphaMap.value},set:function(y){this.uniforms.useAlphaMap.value=y}},color:{enumerable:!0,get:function(){return this.uniforms.color.value},set:function(y){this.uniforms.color.value=y}},lightColor:{enumerable:!0,get:function(){return this.uniforms.lightColor.value},set:function(y){this.uniforms.lightColor.value=y}},time:{enumerable:!0,get:function(){return this.uniforms.time.value},set:function(y){this.uniforms.time.value=y}},uCenter:{enumerable:!0,get:function(){return this.uniforms.uCenter.value},set:function(y){this.uniforms.uCenter.value=y}},size:{enumerable:!0,get:function(){return this.uniforms.size.value},set:function(y){this.uniforms.size.value=y}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(y){this.uniforms.opacity.value=y}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(y){this.uniforms.resolution.value.copy(y)}},sizeAttenuation:{enumerable:!0,get:function(){return this.uniforms.sizeAttenuation.value},set:function(y){this.uniforms.sizeAttenuation.value=y}},dashArray:{enumerable:!0,get:function(){return this.uniforms.dashArray.value},set:function(y){this.uniforms.dashArray.value=y,this.useDash=y!==0?1:0}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(y){this.uniforms.dashOffset.value=y}},dashRatio:{enumerable:!0,get:function(){return this.uniforms.dashRatio.value},set:function(y){this.uniforms.dashRatio.value=y}},useDash:{enumerable:!0,get:function(){return this.uniforms.useDash.value},set:function(y){this.uniforms.useDash.value=y}},visibility:{enumerable:!0,get:function(){return this.uniforms.visibility.value},set:function(y){this.uniforms.visibility.value=y}},alphaTest:{enumerable:!0,get:function(){return this.uniforms.alphaTest.value},set:function(y){this.uniforms.alphaTest.value=y}},repeat:{enumerable:!0,get:function(){return this.uniforms.repeat.value},set:function(y){this.uniforms.repeat.value.copy(y)}}}),b.setValues(g),b}return u}(a.ShaderMaterial);H.prototype.copy=function(l){return a.ShaderMaterial.prototype.copy.call(this,l),this.lineWidth=l.lineWidth,this.map=l.map,this.useMap=l.useMap,this.alphaMap=l.alphaMap,this.useAlphaMap=l.useAlphaMap,this.color.copy(l.color),this.opacity=l.opacity,this.resolution.copy(l.resolution),this.sizeAttenuation=l.sizeAttenuation,this.dashArray.copy(l.dashArray),this.dashOffset.copy(l.dashOffset),this.dashRatio.copy(l.dashRatio),this.useDash=l.useDash,this.visibility=l.visibility,this.alphaTest=l.alphaTest,this.repeat.copy(l.repeat),this};var X=q(607),ie=q(494),pe=q.n(ie),xe={nodes:[],color:new a.Color("red"),lineWidth:3,sizeAttenuation:0},me=function(l){"use strict";(0,T.Z)(u,l);var w=(0,j.Z)(u);function u(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,V.Z)(this,u);var i;return i=w.call(this),i.geometry=new a.BufferGeometry,i.meshline=new x,i.options=(0,d.Z)({},xe,b),i}var g=u.prototype;return g.create=function(){var i=this.options,y=i.nodes,C=i.duration,v=i.delay,f=i.onComplete,s=i.setPointWidth,e=(0,X.Z)(i,["nodes","duration","delay","onComplete","setPointWidth"]),r=this.pencil.getSize(),n=r.width,o=r.height;delete e.key,this.geometry.setFromPoints(y),this.meshline.setGeometry(this.geometry,s);var c=new H((0,E.Z)((0,d.Z)({},e),{resolution:new a.Vector2(n,o)}));this.material=c,this.createMesh(this.meshline,c)},g.resize=function(i,y){this.material.uniforms.resolution.value.set(i,y)},g.animate=function(){var i=this.options,y=i.duration,C=i.delay,v=i.onComplete,f=this.material.uniforms.offset,s=new(pe()).Tween(f.value).to({x:0},y!=null?y:1e3).delay(C!=null?C:0).repeat(1/0);v&&s.onComplete(v),s.start(),this.tween=s},g.dispose=function(){se((0,$.Z)(u.prototype),"dispose",this).call(this),this.tween&&pe().remove(this.tween)},u}(p.ZP),Ce=q(639);function Re(l){if(Array.isArray(l))return l}var O=q(375);function S(){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 D=q(566);function W(l,w){return Re(l)||(0,O.Z)(l,w)||(0,D.Z)(l,w)||S()}var I=require("d3-array"),ae=require("earcut"),le=q.n(ae),ue=require("@turf/boolean-clockwise"),fe=q.n(ue);function he(l,w){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,g=(90-w)*Math.PI/180,b=(90-l)*Math.PI/180;return[u*Math.sin(g)*Math.cos(b),u*Math.cos(g),u*Math.sin(g)*Math.sin(b)]}var ge=q(342),Me=require("delaunator"),we=q.n(Me),Ne=require("@turf/boolean-point-in-polygon"),tt=q.n(Ne),Ae=require("d3-geo"),Te=require("d3-geo-voronoi"),Be=require("d3-scale");function He(l,w){return l.map(function(u){var g=[],b;return u.forEach(function(i){if(b){var y=(0,Ae.geoDistance)(i,b)*180/Math.PI;if(y>w)for(var C=(0,Ae.geoInterpolate)(b,i),v=1/Math.ceil(y/w),f=v;f<1;)g.push(C(f)),f+=v}g.push(b=i)}),g})}function Xe(l){for(var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=w.minLng,g=w.maxLng,b=w.minLat,i=w.maxLat,y=Math.round(Math.pow(360/l,2)/Math.PI),C=(1+Math.sqrt(5))/2,v=function(t){return t/C*360%360-180},f=function(t){return Math.acos(2*t/y-1)/Math.PI*180-90},s=function(t){return y*(Math.cos((t+90)*Math.PI/180)+1)/2},e=[i!==void 0?Math.ceil(s(i)):0,b!==void 0?Math.floor(s(b)):y-1],r=u===void 0&&g===void 0?function(){return!0}:u===void 0?function(t){return t<=g}:g===void 0?function(t){return t>=u}:g>=u?function(t){return t>=u&&t<=g}:function(t){return t>=u||t<=g},n=[],o=e[0];o<=e[1];o++){var c=v(o);r(c)&&n.push([c,f(o)])}return n}function De(l,w){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return u?(0,Ae.geoContains)(w,l):tt()(l,w)}function Ke(l,w){var u={type:"Polygon",coordinates:l},g=W((0,Ae.geoBounds)(u),2),b=W(g[0],2),i=b[0],y=b[1],C=W(g[1],2),v=C[0],f=C[1];if(Math.min(Math.abs(v-i),Math.abs(f-y))<w)return[];var s=i>v||f>=89||y<=-89;return Xe(w,{minLng:i,maxLng:v,minLat:y,maxLat:f}).filter(function(e){return De(e,u,s)})}function Ve(l){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=w.resolution,g=u===void 0?1/0:u,b=He(l,g),i=(0,I.merge)(b),y=Ke(l,g),C=(0,ge.Z)(i).concat((0,ge.Z)(y)),v={type:"Polygon",coordinates:l},f=W((0,Ae.geoBounds)(v),2),s=W(f[0],2),e=s[0],r=s[1],n=W(f[1],2),o=n[0],c=n[1],t=e>o||c>=89||r<=-89,P=[];if(t){var L=(0,Te.geoVoronoi)(C).triangles(),Z=new Map(C.map(function(ve,_e){var Pe=W(ve,2),be=Pe[0],Oe=Pe[1];return["".concat(be,"-").concat(Oe),_e]}));L.features.forEach(function(ve){var _e,Pe=ve.geometry.coordinates[0].slice(0,3).reverse(),be=[];if(Pe.forEach(function(Ee){var Se=W(Ee,2),qe=Se[0],it=Se[1],rt="".concat(qe,"-").concat(it);Z.has(rt)&&be.push(Z.get(rt))}),be.length===3){if(be.some(function(Ee){return Ee<i.length})){var Oe=ve.properties.circumcenter;if(!De(Oe,v,t))return}(_e=P).push.apply(_e,(0,ge.Z)(be))}})}else if(y.length)for(var ne=function(ve,_e){var Pe,be=[2,1,0].map(function(Se){return re.triangles[ve+Se]}),Oe=be.map(function(Se){return C[Se]});if(be.some(function(Se){return Se<i.length})){var Ee=[0,1].map(function(Se){return(0,I.mean)(Oe,function(qe){return qe[Se]})});if(!De(Ee,v,t))return"continue"}(Pe=P).push.apply(Pe,(0,ge.Z)(be))},re=we().from(C),de=0,ce=re.triangles.length;de<ce;de+=3)ne(de,ce);else{var M=le().flatten(b),F=M.vertices,Y=M.holes,Q=Y===void 0?[]:Y;P=le()(F,Q,2)}var ye=(0,Be.scaleLinear)((0,I.extent)(C,function(ve){return ve[0]}),[0,1]),je=(0,Be.scaleLinear)((0,I.extent)(C,function(ve){return ve[1]}),[0,1]),Le=C.map(function(ve){var _e=W(ve,2),Pe=_e[0],be=_e[1];return[ye(Pe),je(be)]}),ze={points:C,indices:P,uvs:Le};return{contour:b,triangles:ze}}var Fe=Ve,Ze=new a.BufferGeometry().setAttribute?"setAttribute":"addAttribute";function ke(l,w){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,g=l.map(function(b){return b.map(function(i){var y=W(i,2),C=y[0],v=y[1];return u?he(C,v,w):[C,v,w]})});return le().flatten(g)}function Ue(l,w,u){for(var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,b=ke(l,w,g),i=b.vertices,y=b.holes,C=ke(l,u,g),v=C.vertices,f=(0,I.merge)([v,i]),s=Math.round(v.length/3),e=new Set(y),r=0,n=[],o=0;o<s;o++){var c=o+1;if(c===s)c=r;else if(e.has(c)){var t=c;c=r,r=t}n.push(o,o+s,c+s),n.push(c+s,c,o)}for(var P=[],L=1;L>=0;L--)for(var Z=0;Z<s;Z+=1)P.push(Z/(s-1),L);return{indices:n,vertices:f,uvs:P,topVerts:v}}function We(l,w,u){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,b=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return{indices:g?l.indices:l.indices.slice().reverse(),vertices:ke([l.points],w,b).vertices,uvs:u}}var Ye=function(l){"use strict";(0,T.Z)(u,l);var w=(0,j.Z)(u);function u(g){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,V.Z)(this,u);var i;i=w.call(this),i.type="PolygonBufferGeometry",i.parameters=(0,d.Z)({},{polygonGeoJson:g,startHeight:0,endHeight:1,closedBottom:!0,closedTop:!0,includeSides:!0,curvatureResolution:5,cartesian:!0,userDataRsoOffset:0},b);var y=i.parameters,C=y.startHeight,v=y.endHeight,f=y.closedBottom,s=y.closedTop,e=y.includeSides,r=y.curvatureResolution,n=y.cartesian,o=y.userDataRsoOffset;fe()(g[0])||g[0].reverse();var c=Fe(g,{resolution:r}),t=c.contour,P=c.triangles,L=(0,I.merge)(P.uvs),Z=[],M=[],F=[],Y=0,Q=function(re){var de=Math.round(Z.length/3),ce=F.length;Z=Z.concat(re.vertices),M=M.concat(re.uvs),F=F.concat(de?re.indices.map(function(ye){return ye+de}):re.indices),i.addGroup(ce,F.length-ce,Y++)};if(e){var ne=Ue(t,C,v,n);Q(ne),i.userData.rso=o?Ue(t,C,v+o,n):ne}return f&&Q(We(P,C,L,!1,n)),s&&Q(We(P,v,L,!0,n)),i.setIndex(F),i[Ze]("position",new a.Float32BufferAttribute(Z,3)),i[Ze]("uv",new a.Float32BufferAttribute(M,2)),i.computeVertexNormals(),i}return u}(a.BufferGeometry),Qe=function(l){"use strict";(0,T.Z)(u,l);var w=(0,j.Z)(u);function u(b){(0,V.Z)(this,u);var i;return i=w.call(this),i.options=(0,d.Z)({},{geojson:[[[]]],startHeight:0,height:5,closedBottom:!0,closedTop:!0,curvatureResolution:1,cartesian:!0,userDataRsoOffset:0},b),i}var g=u.prototype;return g.create=function(){var i=this.options,y=i.startHeight,C=i.height,v=i.closedBottom,f=i.closedTop,s=i.curvatureResolution,e=i.userDataRsoOffset,r=i.cartesian,n=new Ye(this.options.geojson,{startHeight:y,endHeight:y+C,closedBottom:v,closedTop:f,curvatureResolution:s,cartesian:r,userDataRsoOffset:e});this.createMesh(n,this.options.material)},u}(Ce.BaseObject),Ge=new Map,$e={generateTopUV:function(l,w,u,g,b){var i=w[u*3],y=w[u*3+1],C=w[g*3],v=w[g*3+1],f=w[b*3],s=w[b*3+1],e;if(Ge.has(l))e=Ge.get(l);else{var r,n,o,c,t=l.parameters.shapes.getPoints();e={minX:(r=Math).min.apply(r,(0,ge.Z)(t.map(function(Z){var M=Z.x;return M}))),maxX:(n=Math).max.apply(n,(0,ge.Z)(t.map(function(Z){var M=Z.x;return M}))),minY:(o=Math).min.apply(o,(0,ge.Z)(t.map(function(Z){var M=Z.y;return M}))),maxY:(c=Math).max.apply(c,(0,ge.Z)(t.map(function(Z){var M=Z.y;return M})))},Ge.set(l,e)}var P=e.maxX-e.minX,L=e.maxY-e.minY;return[new a.Vector2((i-e.minX)/P,1-(y-e.minY)/L),new a.Vector2((C-e.minX)/P,1-(v-e.minY)/L),new a.Vector2((f-e.minX)/P,1-(s-e.minY)/L)]},generateSideWallUV:function(l,w,u,g,b,i){var y=w[u*3],C=w[u*3+1],v=w[u*3+2],f=w[g*3],s=w[g*3+1],e=w[g*3+2],r=w[b*3],n=w[b*3+1],o=w[b*3+2],c=w[i*3],t=w[i*3+1],P=w[i*3+2];return Math.abs(C-s)<.01?[new a.Vector2(y,1-v),new a.Vector2(f,1-e),new a.Vector2(r,1-o),new a.Vector2(c,1-P)]:[new a.Vector2(C,1-v),new a.Vector2(s,1-e),new a.Vector2(n,1-o),new a.Vector2(t,1-P)]}},Je=function(l){"use strict";(0,T.Z)(u,l);var w=(0,j.Z)(u);function u(b){(0,V.Z)(this,u);var i;return i=w.call(this),i.options=(0,d.Z)({},b),i}var g=u.prototype;return g.create=function(){var i=this.options,y=i.pts,C=i.depth,v=i.material,f=new a.ExtrudeBufferGeometry(new a.Shape(y),{depth:C,bevelEnabled:!1,UVGenerator:$e});this.createMesh(f,v)},u}(Ce.BaseObject)})(),module.exports=Ie})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gl-draw",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "author": "gitplus <hstits@gmail.com>",
5
5
  "scripts": {
6
6
  "start": "PORT=3002 bundler-dev",