gl-draw 0.1.6 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +258 -1
- package/dist/effect/bloom.d.ts +14 -0
- package/dist/effect/index.d.ts +5 -0
- package/dist/effect/index.js +160 -0
- package/dist/effect/index.module.js +160 -0
- package/dist/effect/outline.d.ts +15 -0
- package/dist/effect/scan.d.ts +39 -0
- package/dist/effect/scan2.d.ts +28 -0
- package/dist/effect/ssr.d.ts +15 -0
- package/dist/index.js +3 -3
- package/dist/index.module.js +3 -3
- package/dist/objects/index.js +10 -10
- package/dist/objects/index.module.js +2 -2
- package/dist/objects/node/index.d.ts +3 -0
- package/package.json +6 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import*as Ye from"idb-keyval";import*as V from"three";import*as zt from"three/examples/jsm/renderers/CSS2DRenderer";import*as Je from"three/examples/jsm/renderers/CSS3DRenderer";import*as Dt from"popmotion";import*as Fe from"d3-array";import*as Vt from"earcut";import*as Wt from"@turf/boolean-clockwise";import*as Gt from"delaunator";import*as Ut from"@turf/boolean-point-in-polygon";import*as Te from"d3-geo";import*as Nt from"d3-geo-voronoi";import*as Ft from"d3-scale";var It={666:function(C){var L=function(y){"use strict";var P=Object.prototype,x=P.hasOwnProperty,E,O=typeof Symbol=="function"?Symbol:{},W=O.iterator||"@@iterator",F=O.asyncIterator||"@@asyncIterator",b=O.toStringTag||"@@toStringTag";function j(l,s,p){return Object.defineProperty(l,s,{value:p,enumerable:!0,configurable:!0,writable:!0}),l[s]}try{j({},"")}catch(l){j=function(s,p,A){return s[p]=A}}function $(l,s,p,A){var m=s&&s.prototype instanceof ne?s:ne,Q=Object.create(m.prototype),Z=new ye(A||[]);return Q._invoke=ue(l,p,Z),Q}y.wrap=$;function Y(l,s,p){try{return{type:"normal",arg:l.call(s,p)}}catch(A){return{type:"throw",arg:A}}}var R="suspendedStart",c="suspendedYield",ae="executing",ee="completed",J={};function ne(){}function T(){}function N(){}var k={};j(k,W,function(){return this});var X=Object.getPrototypeOf,G=X&&X(X(ke([])));G&&G!==P&&x.call(G,W)&&(k=G);var I=N.prototype=ne.prototype=Object.create(k);T.prototype=N,j(I,"constructor",N),j(N,"constructor",T),T.displayName=j(N,b,"GeneratorFunction");function H(l){["next","throw","return"].forEach(function(s){j(l,s,function(p){return this._invoke(s,p)})})}y.isGeneratorFunction=function(l){var s=typeof l=="function"&&l.constructor;return s?s===T||(s.displayName||s.name)==="GeneratorFunction":!1},y.mark=function(l){return Object.setPrototypeOf?Object.setPrototypeOf(l,N):(l.__proto__=N,j(l,b,"GeneratorFunction")),l.prototype=Object.create(I),l},y.awrap=function(l){return{__await:l}};function re(l,s){function p(Q,Z,ie,oe){var te=Y(l[Q],l,Z);if(te.type==="throw")oe(te.arg);else{var xe=te.arg,Me=xe.value;return Me&&typeof Me=="object"&&x.call(Me,"__await")?s.resolve(Me.__await).then(function(_e){p("next",_e,ie,oe)},function(_e){p("throw",_e,ie,oe)}):s.resolve(Me).then(function(_e){xe.value=_e,ie(xe)},function(_e){return p("throw",_e,ie,oe)})}}var A;function m(Q,Z){function ie(){return new s(function(oe,te){p(Q,Z,oe,te)})}return A=A?A.then(ie,ie):ie()}this._invoke=m}H(re.prototype),j(re.prototype,F,function(){return this}),y.AsyncIterator=re,y.async=function(l,s,p,A,m){m===void 0&&(m=Promise);var Q=new re($(l,s,p,A),m);return y.isGeneratorFunction(s)?Q:Q.next().then(function(Z){return Z.done?Z.value:Q.next()})};function ue(l,s,p){var A=R;return function(Q,Z){if(A===ae)throw new Error("Generator is already running");if(A===ee){if(Q==="throw")throw Z;return Le()}for(p.method=Q,p.arg=Z;;){var ie=p.delegate;if(ie){var oe=me(ie,p);if(oe){if(oe===J)continue;return oe}}if(p.method==="next")p.sent=p._sent=p.arg;else if(p.method==="throw"){if(A===R)throw A=ee,p.arg;p.dispatchException(p.arg)}else p.method==="return"&&p.abrupt("return",p.arg);A=ae;var te=Y(l,s,p);if(te.type==="normal"){if(A=p.done?ee:c,te.arg===J)continue;return{value:te.arg,done:p.done}}else te.type==="throw"&&(A=ee,p.method="throw",p.arg=te.arg)}}}function me(l,s){var p=l.iterator[s.method];if(p===E){if(s.delegate=null,s.method==="throw"){if(l.iterator.return&&(s.method="return",s.arg=E,me(l,s),s.method==="throw"))return J;s.method="throw",s.arg=new TypeError("The iterator does not provide a 'throw' method")}return J}var A=Y(p,l.iterator,s.arg);if(A.type==="throw")return s.method="throw",s.arg=A.arg,s.delegate=null,J;var m=A.arg;if(!m)return s.method="throw",s.arg=new TypeError("iterator result is not an object"),s.delegate=null,J;if(m.done)s[l.resultName]=m.value,s.next=l.nextLoc,s.method!=="return"&&(s.method="next",s.arg=E);else return m;return s.delegate=null,J}H(I),j(I,b,"Generator"),j(I,W,function(){return this}),j(I,"toString",function(){return"[object Generator]"});function q(l){var s={tryLoc:l[0]};1 in l&&(s.catchLoc=l[1]),2 in l&&(s.finallyLoc=l[2],s.afterLoc=l[3]),this.tryEntries.push(s)}function B(l){var s=l.completion||{};s.type="normal",delete s.arg,l.completion=s}function ye(l){this.tryEntries=[{tryLoc:"root"}],l.forEach(q,this),this.reset(!0)}y.keys=function(l){var s=[];for(var p in l)s.push(p);return s.reverse(),function A(){for(;s.length;){var m=s.pop();if(m in l)return A.value=m,A.done=!1,A}return A.done=!0,A}};function ke(l){if(l){var s=l[W];if(s)return s.call(l);if(typeof l.next=="function")return l;if(!isNaN(l.length)){var p=-1,A=function m(){for(;++p<l.length;)if(x.call(l,p))return m.value=l[p],m.done=!1,m;return m.value=E,m.done=!0,m};return A.next=A}}return{next:Le}}y.values=ke;function Le(){return{value:E,done:!0}}return ye.prototype={constructor:ye,reset:function(l){if(this.prev=0,this.next=0,this.sent=this._sent=E,this.done=!1,this.delegate=null,this.method="next",this.arg=E,this.tryEntries.forEach(B),!l)for(var s in this)s.charAt(0)==="t"&&x.call(this,s)&&!isNaN(+s.slice(1))&&(this[s]=E)},stop:function(){this.done=!0;var l=this.tryEntries[0],s=l.completion;if(s.type==="throw")throw s.arg;return this.rval},dispatchException:function(l){if(this.done)throw l;var s=this;function p(oe,te){return Q.type="throw",Q.arg=l,s.next=oe,te&&(s.method="next",s.arg=E),!!te}for(var A=this.tryEntries.length-1;A>=0;--A){var m=this.tryEntries[A],Q=m.completion;if(m.tryLoc==="root")return p("end");if(m.tryLoc<=this.prev){var Z=x.call(m,"catchLoc"),ie=x.call(m,"finallyLoc");if(Z&&ie){if(this.prev<m.catchLoc)return p(m.catchLoc,!0);if(this.prev<m.finallyLoc)return p(m.finallyLoc)}else if(Z){if(this.prev<m.catchLoc)return p(m.catchLoc,!0)}else if(ie){if(this.prev<m.finallyLoc)return p(m.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(l,s){for(var p=this.tryEntries.length-1;p>=0;--p){var A=this.tryEntries[p];if(A.tryLoc<=this.prev&&x.call(A,"finallyLoc")&&this.prev<A.finallyLoc){var m=A;break}}m&&(l==="break"||l==="continue")&&m.tryLoc<=s&&s<=m.finallyLoc&&(m=null);var Q=m?m.completion:{};return Q.type=l,Q.arg=s,m?(this.method="next",this.next=m.finallyLoc,J):this.complete(Q)},complete:function(l,s){if(l.type==="throw")throw l.arg;return l.type==="break"||l.type==="continue"?this.next=l.arg:l.type==="return"?(this.rval=this.arg=l.arg,this.method="return",this.next="end"):l.type==="normal"&&s&&(this.next=s),J},finish:function(l){for(var s=this.tryEntries.length-1;s>=0;--s){var p=this.tryEntries[s];if(p.finallyLoc===l)return this.complete(p.completion,p.afterLoc),B(p),J}},catch:function(l){for(var s=this.tryEntries.length-1;s>=0;--s){var p=this.tryEntries[s];if(p.tryLoc===l){var A=p.completion;if(A.type==="throw"){var m=A.arg;B(p)}return m}}throw new Error("illegal catch attempt")},delegateYield:function(l,s,p){return this.delegate={iterator:ke(l),resultName:s,nextLoc:p},this.method==="next"&&(this.arg=E),J}},y}(C.exports);try{regeneratorRuntime=L}catch(y){typeof globalThis=="object"?globalThis.regeneratorRuntime=L:Function("r","regeneratorRuntime = r")(L)}},182:function(C,L,y){y.d(L,{Z:function(){return P}});function P(x){if(x.geometry&&x.geometry.dispose(),x.material){var E=Array.isArray(x.material)?x.material:[x.material];E.forEach(function(O){var W,F,b,j,$,Y,R,c,ae,ee,J,ne,T;(W=O.map)===null||W===void 0||W.dispose(),(F=O.lightMap)===null||F===void 0||F.dispose(),(b=O.bumpMap)===null||b===void 0||b.dispose(),(j=O.normalMap)===null||j===void 0||j.dispose(),($=O.specularMap)===null||$===void 0||$.dispose(),(Y=O.envMap)===null||Y===void 0||Y.dispose(),(R=O.alphaMap)===null||R===void 0||R.dispose(),(c=O.aoMap)===null||c===void 0||c.dispose(),(ae=O.displacementMap)===null||ae===void 0||ae.dispose(),(ee=O.emissiveMap)===null||ee===void 0||ee.dispose(),(J=O.gradientMap)===null||J===void 0||J.dispose(),(ne=O.metalnessMap)===null||ne===void 0||ne.dispose(),(T=O.roughnessMap)===null||T===void 0||T.dispose(),O.dispose()})}}},175:function(C,L,y){y.d(L,{wf:function(){return O.Z}});var P=y(666),x=y.n(P),E=null,O=y(182),W=y(949);function F(T){if(T.material){var N=Array.isArray(T.material)?T.material:[T.material];N.forEach(function(k){var X,G;(X=k.color)===null||X===void 0||X.convertSRGBToLinear(),(G=k.emissive)===null||G===void 0||G.convertSRGBToLinear(),k.map&&(k.map.encoding=THREE.sRGBEncoding),k.emissiveMap&&(k.emissiveMap.encoding=THREE.sRGBEncoding)})}}var b=y(568),j=y(924),$=T=>{var N={};return y.d(N,T),N},Y=T=>()=>T,R=$({get:()=>Ye.get,set:()=>Ye.set}),c=y(620),ae=null,ee=null,J=function(){var T=(0,b.Z)(x().mark(function N(k,X){var G,I,H,re,ue,me;return x().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return G=X.version,B.next=4,(0,R.get)(k);case 4:if(H=B.sent,!(H&&H[G])){B.next=9;break}I=H[G],B.next=15;break;case 9:return B.next=11,(0,c.Z)(fetch(k).then(function(ye){if(ye.ok)return ye.blob();throw new Error}));case 11:re=B.sent,ue=re.res,me=re.err,me||(I=ue,(0,R.set)(k,(0,j.Z)({},G,ue)));case 15:return B.abrupt("return",I?{url:URL.createObjectURL(I)}:{url:k});case 16:case"end":return B.stop()}},N)}));return function(k,X){return T.apply(this,arguments)}}(),ne=y(977)},620:function(C,L,y){y.d(L,{Z:function(){return x}});var P=y(42);function x(E){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return E.then(function(W){return(0,P.Z)({err:null,res:W},O)}).catch(function(W){return(0,P.Z)({err:W,res:void 0},O)})}},977:function(C,L,y){y.d(L,{y:function(){return E}});var P=y(949),x=new Map,E=function(W){return{generateTopUV:function(F,b,j,$,Y){var R=b[j*3],c=b[j*3+1],ae=b[$*3],ee=b[$*3+1],J=b[Y*3],ne=b[Y*3+1],T;if(x.has(F))T=x.get(F);else{var N=W&&W.box3||new P.Box3;if(!W||!W.box3){var k=F.parameters.shapes.getPoints();N.setFromArray(k.map(function(H){return[H.x,H.y,0]}).flat())}var X=N.getSize(new P.Vector3);T={box:N,size:X},x.set(F,T)}var G=T.box,I=T.size;return[new P.Vector2((R-G.min.x)/I.x,(c-G.min.y)/I.y),new P.Vector2((ae-G.min.x)/I.x,(ee-G.min.y)/I.y),new P.Vector2((J-G.min.x)/I.x,(ne-G.min.y)/I.y)]},generateSideWallUV:function(F,b,j,$,Y,R){var c=b[j*3],ae=b[j*3+1],ee=b[j*3+2],J=b[$*3],ne=b[$*3+1],T=b[$*3+2],N=b[Y*3],k=b[Y*3+1],X=b[Y*3+2],G=b[R*3],I=b[R*3+1],H=b[R*3+2],re;if(x.has(b))re=x.get(b);else{var ue=new P.Box3;ue.setFromArray(b);var me=ue.getSize(new P.Vector3);re={box:ue,size:me},x.set(b,re)}var q=re.box,B=re.size;return Math.abs(ae-ne)<.01?[new P.Vector2((c-q.min.x)/B.x,(ee-q.min.z)/B.z),new P.Vector2((J-q.min.x)/B.x,(T-q.min.z)/B.z),new P.Vector2((N-q.min.x)/B.x,(X-q.min.z)/B.z),new P.Vector2((G-q.min.x)/B.x,(H-q.min.z)/B.z)]:[new P.Vector2((ae-q.min.y)/B.x,(ee-q.min.z)/B.z),new P.Vector2((ne-q.min.y)/B.x,(T-q.min.z)/B.z),new P.Vector2((k-q.min.y)/B.x,(X-q.min.z)/B.z),new P.Vector2((I-q.min.y)/B.x,(H-q.min.z)/B.z)]}}},O=function(){x.clear()}},949:function(C,L,y){var P=E=>{var O={};return y.d(O,E),O},x=E=>()=>E;C.exports=P({Box3:()=>V.Box3,BufferAttribute:()=>V.BufferAttribute,BufferGeometry:()=>V.BufferGeometry,CanvasTexture:()=>V.CanvasTexture,Color:()=>V.Color,DoubleSide:()=>V.DoubleSide,ExtrudeBufferGeometry:()=>V.ExtrudeBufferGeometry,Float32BufferAttribute:()=>V.Float32BufferAttribute,Group:()=>V.Group,LineSegments:()=>V.LineSegments,Matrix4:()=>V.Matrix4,Mesh:()=>V.Mesh,MeshBasicMaterial:()=>V.MeshBasicMaterial,NormalBlending:()=>V.NormalBlending,PlaneBufferGeometry:()=>V.PlaneBufferGeometry,PlaneGeometry:()=>V.PlaneGeometry,Points:()=>V.Points,RGBAFormat:()=>V.RGBAFormat,Ray:()=>V.Ray,ShaderChunk:()=>V.ShaderChunk,ShaderMaterial:()=>V.ShaderMaterial,Shape:()=>V.Shape,Sphere:()=>V.Sphere,Sprite:()=>V.Sprite,SpriteMaterial:()=>V.SpriteMaterial,Texture:()=>V.Texture,TextureLoader:()=>V.TextureLoader,UniformsLib:()=>V.UniformsLib,Vector2:()=>V.Vector2,Vector3:()=>V.Vector3,VideoTexture:()=>V.VideoTexture})},568:function(C,L,y){y.d(L,{Z:function(){return x}});function P(E,O,W,F,b,j,$){try{var Y=E[j]($),R=Y.value}catch(c){W(c);return}Y.done?O(R):Promise.resolve(R).then(F,b)}function x(E){return function(){var O=this,W=arguments;return new Promise(function(F,b){var j=E.apply(O,W);function $(R){P(j,F,b,$,Y,"next",R)}function Y(R){P(j,F,b,$,Y,"throw",R)}$(void 0)})}}},924:function(C,L,y){y.d(L,{Z:function(){return P}});function P(x,E,O){return E in x?Object.defineProperty(x,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):x[E]=O,x}},42:function(C,L,y){y.d(L,{Z:function(){return x}});var P=y(924);function x(E){for(var O=1;O<arguments.length;O++){var W=arguments[O]!=null?arguments[O]:{},F=Object.keys(W);typeof Object.getOwnPropertySymbols=="function"&&(F=F.concat(Object.getOwnPropertySymbols(W).filter(function(b){return Object.getOwnPropertyDescriptor(W,b).enumerable}))),F.forEach(function(b){(0,P.Z)(E,b,W[b])})}return E}}},Qe={};function U(C){var L=Qe[C];if(L!==void 0)return L.exports;var y=Qe[C]={exports:{}};return It[C](y,y.exports,U),y.exports}(function(){U.n=function(C){var L=C&&C.__esModule?function(){return C.default}:function(){return C};return U.d(L,{a:L}),L}})(),function(){U.d=function(C,L){for(var y in L)U.o(L,y)&&!U.o(C,y)&&Object.defineProperty(C,y,{enumerable:!0,get:L[y]})}}(),function(){U.o=function(C,L){return Object.prototype.hasOwnProperty.call(C,L)}}();var fe={};(function(){U.d(fe,{Ei:function(){return Lt},Yo:function(){return jt},Ee:function(){return ie},x1:function(){return st},VJ:function(){return he},r7:function(){return De},XA:function(){return Ie},NB:function(){return qe},xv:function(){return A},nk:function(){return Me}});function C(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function L(e,n){return L=Object.setPrototypeOf||function(i,a){return i.__proto__=a,i},L(e,n)}function y(e,n){return L(e,n)}function P(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&y(e,n)}var x=U(42);function E(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function O(e,n){return n=n!=null?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}),e}function W(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},F(e)}function b(e){return F(e)}function j(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $(e){return e&&e.constructor===Symbol?"symbol":typeof e}function Y(e,n){return n&&($(n)==="object"||typeof n=="function")?n:j(e)}function R(e){var n=W();return function(){var i=b(e),a;if(n){var t=b(this).constructor;a=Reflect.construct(i,arguments,t)}else a=i.apply(this,arguments);return Y(this,a)}}var c=U(949);function ae(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function ee(e,n,r){return ae()?ee=Reflect.construct:ee=function(a,t,o){var u=[null];u.push.apply(u,t);var h=Function.bind.apply(a,u),v=new h;return o&&y(v,o.prototype),v},ee.apply(null,arguments)}function J(e,n,r){return ee.apply(null,arguments)}function ne(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function T(e,n,r){return n&&ne(e.prototype,n),r&&ne(e,r),e}function N(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=new Array(n);r<n;r++)i[r]=e[r];return i}function k(e){if(Array.isArray(e))return N(e)}function X(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function G(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function I(e,n){if(!!e){if(typeof e=="string")return N(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N(e,n)}}function H(e){return k(e)||X(e)||I(e)||G()}var re=U(620);function ue(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r={};return r.promise=new Promise(function(i,a){r.resolve=i,r.reject=a}),e&&(r.promise=(0,re.Z)(r.promise,n)),r}var me=e=>{var n={};return U.d(n,e),n},q=e=>()=>e,B=me({CSS2DObject:()=>zt.CSS2DObject}),ye=e=>{var n={};return U.d(n,e),n},ke=e=>()=>e,Le=ye({CSS3DObject:()=>Je.CSS3DObject,CSS3DSprite:()=>Je.CSS3DSprite}),l=U(175),s=function(e){e&&((0,l.wf)(e),e.children.forEach(function(n){n.userData.BaseObject_||s(n)}))},p=function(){"use strict";function e(){C(this,e),this.objecttype__="BaseObject",this.userData={},this.pm=ue(),this.visible=!1}var n=e.prototype;return n.init=function(){},n.create=function(){},n.render=function(){},n.update=function(i,a){},n.resize=function(i,a){},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 i=arguments.length,a=new Array(i),t=0;t<i;t++)a[t]=arguments[t];return this.object3d=J(c.Mesh,H(a)),this},n.createGroup=function(){return this.object3d=new c.Group,this},n.createPoints=function(){for(var i=arguments.length,a=new Array(i),t=0;t<i;t++)a[t]=arguments[t];return this.object3d=J(c.Points,H(a)),this},n.createCSS2DObject=function(i){return this.object3d=new B.CSS2DObject(i),this},n.createCSS3DObject=function(i){return this.object3d=new Le.CSS3DObject(i),this},n.createCSS3DSprite=function(i){return this.object3d=new Le.CSS3DSprite(i),this},n.createSprite=function(i){return this.object3d=new c.Sprite(i),this},n.add=function(){for(var i=arguments.length,a=new Array(i),t=0;t<i;t++)a[t]=arguments[t];var o;return(o=this.object3d).add.apply(o,H(a)),this},n.remove=function(){for(var i=arguments.length,a=new Array(i),t=0;t<i;t++)a[t]=arguments[t];var o;return(o=this.object3d).remove.apply(o,H(a)),this},n.getSize=function(){var i=new c.Box3().setFromObject(this.object3d);return{min:i.min,max:i.max,size:i.getSize(new c.Vector3)}},n.traverse=function(i){i(this),this.children.forEach(function(a){a.traverse(i)})},n.dispose=function(){s(this.object3d)},T(e,[{key:"parent",get:function(){var i=this.object3d.parent;return(i==null?void 0:i.userData.BaseObject_)||this.pencil.scene}},{key:"children",get:function(){return this.object3d.children.map(function(i){return i.userData.BaseObject_}).filter(function(i){return!!i})}}]),e}(),A=function(e){"use strict";P(r,e);var n=R(r);function r(a){C(this,r);var t;return t=n.call(this),t.width=0,t.canvas=document.createElement("canvas"),t.options=(0,x.Z)({},{scale:.5,fontSize:28,fontFamily:"system-ui,-apple-system,BlinkMacSystemFont,sans-serif",fontWeight:"normal",flipX:!1,sprite:!1,sizeAttenuation:!0},a),t}var i=r.prototype;return i.create=function(){var t=this.options,o=t.position,u=t.lookAt,h=t.sprite,v=t.text,d=t.sizeAttenuation;if(h){var _=new c.Sprite(new c.SpriteMaterial({transparent:!0,sizeAttenuation:d}));this.object3d=_}else{var g=new c.MeshBasicMaterial({side:c.DoubleSide,transparent:!0}),M=new c.PlaneGeometry(1,1,1,1);this.createMesh(M,g)}this.object3d.position.copy(o),u&&this.object3d.lookAt(u),this.setText(v)},i.setText=function(t,o){var u=(0,x.Z)(O((0,x.Z)({},this.options),{text:t}),o||{}),h=u.text,v=u.fontSize,d=u.fontFamily,_=u.fontWeight,g=u.flipX,M=u.scale,w=this.canvas;w.width=v*h.length*2,w.height=v;var S=w.getContext("2d");S.font="".concat(_," ").concat(v,"px/1 ").concat(d);var f=S.measureText(h).width;w.width=f,this.width=f,S=w.getContext("2d"),S.clearRect(0,0,w.width,w.height),g&&S.scale(-1,1),S.font="".concat(_," ").concat(v,"px/1 ").concat(d),S.textBaseline="middle",S.fillStyle="#ffffff",S.fillText(h,g?f*-1:0,w.height/2),S.restore();var z=new c.Texture(w);z.anisotropy=16,z.needsUpdate=!0;var D=this.object3d;D.material.map&&D.material.map.dispose(),D.material.map=z,D.material.needsUpdate=!0,D.scale.set(z.image.width*M,z.image.height*M,1)},r}(p),m=U(568),Q=U(666),Z=U.n(Q),ie=function(e){"use strict";P(r,e);var n=R(r);function r(a){C(this,r);var t;return t=n.call(this),t.options=a,t}var i=r.prototype;return i.getMaterial=function(){var t=this;return(0,m.Z)(Z().mark(function o(){var u,h,v,d,_,g,M,w,S,f;return Z().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return u=t.options,h=u.transparent,v=u.blending,d=u.src,_=u.depthWrite,g=u.alphaTest,M=u.sprite,w=u.sizeAttenuation,D.next=3,new c.TextureLoader().loadAsync(d);case 3:return S=D.sent,f=M?new c.SpriteMaterial({map:S,transparent:h!=null?h:!1,blending:v!=null?v:c.NormalBlending,depthWrite:_!=null?_:!0,alphaTest:g!=null?g:0,sizeAttenuation:w!=null?w:!0}):new c.MeshBasicMaterial({map:S,transparent:h!=null?h:!1,blending:v!=null?v:c.NormalBlending,depthWrite:_!=null?_:!0,alphaTest:g!=null?g:0}),D.abrupt("return",f);case 6:case"end":return D.stop()}},o)}))()},i.create=function(){var t=this;return(0,m.Z)(Z().mark(function o(){var u,h,v,d,_,g,M,w;return Z().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(u=t.options,h=u.scale,v=u.position,d=u.src,_=u.cache,g=u.sprite,!(_&&!_.get(d))){f.next=7;break}return _.init(d),f.next=5,t.getMaterial();case 5:M=f.sent,_.set(d,M);case 7:if(!_){f.next=13;break}return f.next=10,_.get(d);case 10:f.t0=f.sent,f.next=16;break;case 13:return f.next=15,t.getMaterial();case 15:f.t0=f.sent;case 16:w=f.t0,t.texture=w.map,g?t.createSprite(w):t.createMesh(new c.PlaneBufferGeometry(1,1),w),h&&t.setScale(h),v&&t.object3d.position.copy(v);case 21:case"end":return f.stop()}},o)}))()},i.setScale=function(t){this.object3d.scale.set(this.texture.image.width*t,this.texture.image.height*t,1)},r}(p);function oe(e,n){for(;!Object.prototype.hasOwnProperty.call(e,n)&&(e=b(e),e!==null););return e}function te(e,n,r){return typeof Reflect!="undefined"&&Reflect.get?te=Reflect.get:te=function(a,t,o){var u=oe(a,t);if(!!u){var h=Object.getOwnPropertyDescriptor(u,t);return h.get?h.get.call(o||a):h.value}},te(e,n,r)}function xe(e,n,r){return te(e,n,r)}var Me=function(e){"use strict";P(r,e);var n=R(r);function r(a){C(this,r);var t;return t=n.call(this),t.options=(0,x.Z)({},{autoPlay:!0,loop:!0},a),t}var i=r.prototype;return i.getMaterial=function(){var t=this.options,o=t.src,u=t.transparent,h=t.blending,v=t.depthWrite,d=t.format,_=t.autoPlay,g=t.loop,M=t.alphaTest,w=t.sprite,S=ue(),f=document.createElement("video");return f.addEventListener("loadedmetadata",function(){var z=new c.VideoTexture(f);z.format=d!=null?d:c.RGBAFormat,z.needsUpdate=!0;var D=w?new c.SpriteMaterial({map:z,transparent:u!=null?u:!1,blending:h!=null?h:c.NormalBlending,depthWrite:v!=null?v:!0,alphaTest:M!=null?M:0}):new c.MeshBasicMaterial({map:z,transparent:u!=null?u:!1,blending:h!=null?h:c.NormalBlending,depthWrite:v!=null?v:!0,alphaTest:M!=null?M:0});S.resolve(D)},!1),f.src=o,f.muted=!0,f.autoplay=_,f.loop=g,f.preload="auto",S.promise},i.create=function(){var t=this;return(0,m.Z)(Z().mark(function o(){var u,h,v,d,_,g,M,w;return Z().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(u=t.options,h=u.scale,v=u.position,d=u.src,_=u.cache,g=u.sprite,!(_&&!_.get(d))){f.next=7;break}return _.init(d),f.next=5,t.getMaterial();case 5:M=f.sent,_.set(d,M);case 7:if(!_){f.next=13;break}return f.next=10,_.get(d);case 10:f.t0=f.sent,f.next=16;break;case 13:return f.next=15,t.getMaterial();case 15:f.t0=f.sent;case 16:w=f.t0,t.video=w.map.image,g?t.createSprite(w):t.createMesh(new c.PlaneBufferGeometry(1,1),w),h&&t.setScale(h),v&&t.object3d.position.copy(v);case 21:case"end":return f.stop()}},o)}))()},i.setScale=function(t){this.object3d.scale.set(this.video.videoWidth*t,this.video.videoHeight*t,1)},i.render=function(){var t=this.options.autoPlay;t&&this.video.play()},i.dispose=function(){this.video.pause(),this.video.src="",this.video.load(),xe(b(r.prototype),"dispose",this).call(this)},r}(p),_e=function(e){"use strict";P(r,e);var n=R(r);function r(a){C(this,r);var t;return t=n.call(this),t.options=(0,x.Z)({},a),t}var i=r.prototype;return i.create=function(){var t=this.options,o=t.position,u=t.children,h=t.onClick,v=t.zIndexFix,d=document.createElement("div");d.appendChild(u),this.createCSS2DObject(d),o&&this.object3d.position.copy(o),h&&d.addEventListener("click",h),v&&(this.object3d.userData.zIndexFix=v)},i.getMaterial=function(t){return(0,m.Z)(Z().mark(function o(){var u,h,v,d;return Z().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return u=document.createElement("canvas"),u.width=256,u.height=256,h=u.getContext("2d"),h.fillStyle="#ff0000",h.fillRect(0,0,256,256),v=new c.CanvasTexture(u),d=new c.SpriteMaterial({map:v,opacity:t?1:0,transparent:!0,alphaTest:.1,sizeAttenuation:!1}),g.abrupt("return",d);case 9:case"end":return g.stop()}},o)}))()},i.createPickObject=function(t){var o=t.show,u=o===void 0?!1:o,h=t.scale,v=h===void 0?new c.Vector3(1,1,1):h,d=t.position,_=d===void 0?new c.Vector3(0,0,0):d,g=t.cache,M=this;return(0,m.Z)(Z().mark(function w(){var S,f,z,D;return Z().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:if(S="node-create-pick-object",!(g&&!g.get(S))){K.next=7;break}return g.init(S),K.next=5,M.getMaterial(u);case 5:f=K.sent,g.set(S,f);case 7:if(!g){K.next=13;break}return K.next=10,g.get(S);case 10:K.t0=K.sent,K.next=16;break;case 13:return K.next=15,M.getMaterial(u);case 15:K.t0=K.sent;case 16:z=K.t0,D=new c.Sprite(z),D.scale.set(z.map.image.width*v.x,z.map.image.height*v.y,1),D.position.copy(_),M.add(D),M.pickObject=D;case 22:case"end":return K.stop()}},w)}))()},i.dispose=function(){var t=this.options.onClick;if(t){var o;(o=this.object3d.element)===null||o===void 0||o.removeEventListener("click",t)}xe(b(r.prototype),"dispose",this).call(this)},r}(p),qe=_e,et=`
|
|
1
|
+
import*as Ye from"idb-keyval";import*as V from"three";import*as zt from"three/examples/jsm/renderers/CSS2DRenderer";import*as Je from"three/examples/jsm/renderers/CSS3DRenderer";import*as Dt from"popmotion";import*as Fe from"d3-array";import*as Vt from"earcut";import*as Wt from"@turf/boolean-clockwise";import*as Gt from"delaunator";import*as Ut from"@turf/boolean-point-in-polygon";import*as Be from"d3-geo";import*as Nt from"d3-geo-voronoi";import*as Ft from"d3-scale";var It={666:function(C){var L=function(y){"use strict";var P=Object.prototype,x=P.hasOwnProperty,E,O=typeof Symbol=="function"?Symbol:{},W=O.iterator||"@@iterator",F=O.asyncIterator||"@@asyncIterator",b=O.toStringTag||"@@toStringTag";function j(l,s,p){return Object.defineProperty(l,s,{value:p,enumerable:!0,configurable:!0,writable:!0}),l[s]}try{j({},"")}catch(l){j=function(s,p,A){return s[p]=A}}function $(l,s,p,A){var _=s&&s.prototype instanceof ne?s:ne,Q=Object.create(_.prototype),X=new ye(A||[]);return Q._invoke=ue(l,p,X),Q}y.wrap=$;function Y(l,s,p){try{return{type:"normal",arg:l.call(s,p)}}catch(A){return{type:"throw",arg:A}}}var k="suspendedStart",c="suspendedYield",ae="executing",ee="completed",J={};function ne(){}function R(){}function N(){}var B={};j(B,W,function(){return this});var H=Object.getPrototypeOf,G=H&&H(H(Re([])));G&&G!==P&&x.call(G,W)&&(B=G);var I=N.prototype=ne.prototype=Object.create(B);R.prototype=N,j(I,"constructor",N),j(N,"constructor",R),R.displayName=j(N,b,"GeneratorFunction");function Z(l){["next","throw","return"].forEach(function(s){j(l,s,function(p){return this._invoke(s,p)})})}y.isGeneratorFunction=function(l){var s=typeof l=="function"&&l.constructor;return s?s===R||(s.displayName||s.name)==="GeneratorFunction":!1},y.mark=function(l){return Object.setPrototypeOf?Object.setPrototypeOf(l,N):(l.__proto__=N,j(l,b,"GeneratorFunction")),l.prototype=Object.create(I),l},y.awrap=function(l){return{__await:l}};function re(l,s){function p(Q,X,ie,oe){var te=Y(l[Q],l,X);if(te.type==="throw")oe(te.arg);else{var xe=te.arg,Me=xe.value;return Me&&typeof Me=="object"&&x.call(Me,"__await")?s.resolve(Me.__await).then(function(_e){p("next",_e,ie,oe)},function(_e){p("throw",_e,ie,oe)}):s.resolve(Me).then(function(_e){xe.value=_e,ie(xe)},function(_e){return p("throw",_e,ie,oe)})}}var A;function _(Q,X){function ie(){return new s(function(oe,te){p(Q,X,oe,te)})}return A=A?A.then(ie,ie):ie()}this._invoke=_}Z(re.prototype),j(re.prototype,F,function(){return this}),y.AsyncIterator=re,y.async=function(l,s,p,A,_){_===void 0&&(_=Promise);var Q=new re($(l,s,p,A),_);return y.isGeneratorFunction(s)?Q:Q.next().then(function(X){return X.done?X.value:Q.next()})};function ue(l,s,p){var A=k;return function(Q,X){if(A===ae)throw new Error("Generator is already running");if(A===ee){if(Q==="throw")throw X;return Le()}for(p.method=Q,p.arg=X;;){var ie=p.delegate;if(ie){var oe=me(ie,p);if(oe){if(oe===J)continue;return oe}}if(p.method==="next")p.sent=p._sent=p.arg;else if(p.method==="throw"){if(A===k)throw A=ee,p.arg;p.dispatchException(p.arg)}else p.method==="return"&&p.abrupt("return",p.arg);A=ae;var te=Y(l,s,p);if(te.type==="normal"){if(A=p.done?ee:c,te.arg===J)continue;return{value:te.arg,done:p.done}}else te.type==="throw"&&(A=ee,p.method="throw",p.arg=te.arg)}}}function me(l,s){var p=l.iterator[s.method];if(p===E){if(s.delegate=null,s.method==="throw"){if(l.iterator.return&&(s.method="return",s.arg=E,me(l,s),s.method==="throw"))return J;s.method="throw",s.arg=new TypeError("The iterator does not provide a 'throw' method")}return J}var A=Y(p,l.iterator,s.arg);if(A.type==="throw")return s.method="throw",s.arg=A.arg,s.delegate=null,J;var _=A.arg;if(!_)return s.method="throw",s.arg=new TypeError("iterator result is not an object"),s.delegate=null,J;if(_.done)s[l.resultName]=_.value,s.next=l.nextLoc,s.method!=="return"&&(s.method="next",s.arg=E);else return _;return s.delegate=null,J}Z(I),j(I,b,"Generator"),j(I,W,function(){return this}),j(I,"toString",function(){return"[object Generator]"});function q(l){var s={tryLoc:l[0]};1 in l&&(s.catchLoc=l[1]),2 in l&&(s.finallyLoc=l[2],s.afterLoc=l[3]),this.tryEntries.push(s)}function T(l){var s=l.completion||{};s.type="normal",delete s.arg,l.completion=s}function ye(l){this.tryEntries=[{tryLoc:"root"}],l.forEach(q,this),this.reset(!0)}y.keys=function(l){var s=[];for(var p in l)s.push(p);return s.reverse(),function A(){for(;s.length;){var _=s.pop();if(_ in l)return A.value=_,A.done=!1,A}return A.done=!0,A}};function Re(l){if(l){var s=l[W];if(s)return s.call(l);if(typeof l.next=="function")return l;if(!isNaN(l.length)){var p=-1,A=function _(){for(;++p<l.length;)if(x.call(l,p))return _.value=l[p],_.done=!1,_;return _.value=E,_.done=!0,_};return A.next=A}}return{next:Le}}y.values=Re;function Le(){return{value:E,done:!0}}return ye.prototype={constructor:ye,reset:function(l){if(this.prev=0,this.next=0,this.sent=this._sent=E,this.done=!1,this.delegate=null,this.method="next",this.arg=E,this.tryEntries.forEach(T),!l)for(var s in this)s.charAt(0)==="t"&&x.call(this,s)&&!isNaN(+s.slice(1))&&(this[s]=E)},stop:function(){this.done=!0;var l=this.tryEntries[0],s=l.completion;if(s.type==="throw")throw s.arg;return this.rval},dispatchException:function(l){if(this.done)throw l;var s=this;function p(oe,te){return Q.type="throw",Q.arg=l,s.next=oe,te&&(s.method="next",s.arg=E),!!te}for(var A=this.tryEntries.length-1;A>=0;--A){var _=this.tryEntries[A],Q=_.completion;if(_.tryLoc==="root")return p("end");if(_.tryLoc<=this.prev){var X=x.call(_,"catchLoc"),ie=x.call(_,"finallyLoc");if(X&&ie){if(this.prev<_.catchLoc)return p(_.catchLoc,!0);if(this.prev<_.finallyLoc)return p(_.finallyLoc)}else if(X){if(this.prev<_.catchLoc)return p(_.catchLoc,!0)}else if(ie){if(this.prev<_.finallyLoc)return p(_.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(l,s){for(var p=this.tryEntries.length-1;p>=0;--p){var A=this.tryEntries[p];if(A.tryLoc<=this.prev&&x.call(A,"finallyLoc")&&this.prev<A.finallyLoc){var _=A;break}}_&&(l==="break"||l==="continue")&&_.tryLoc<=s&&s<=_.finallyLoc&&(_=null);var Q=_?_.completion:{};return Q.type=l,Q.arg=s,_?(this.method="next",this.next=_.finallyLoc,J):this.complete(Q)},complete:function(l,s){if(l.type==="throw")throw l.arg;return l.type==="break"||l.type==="continue"?this.next=l.arg:l.type==="return"?(this.rval=this.arg=l.arg,this.method="return",this.next="end"):l.type==="normal"&&s&&(this.next=s),J},finish:function(l){for(var s=this.tryEntries.length-1;s>=0;--s){var p=this.tryEntries[s];if(p.finallyLoc===l)return this.complete(p.completion,p.afterLoc),T(p),J}},catch:function(l){for(var s=this.tryEntries.length-1;s>=0;--s){var p=this.tryEntries[s];if(p.tryLoc===l){var A=p.completion;if(A.type==="throw"){var _=A.arg;T(p)}return _}}throw new Error("illegal catch attempt")},delegateYield:function(l,s,p){return this.delegate={iterator:Re(l),resultName:s,nextLoc:p},this.method==="next"&&(this.arg=E),J}},y}(C.exports);try{regeneratorRuntime=L}catch(y){typeof globalThis=="object"?globalThis.regeneratorRuntime=L:Function("r","regeneratorRuntime = r")(L)}},182:function(C,L,y){y.d(L,{Z:function(){return P}});function P(x){if(x.geometry&&x.geometry.dispose(),x.material){var E=Array.isArray(x.material)?x.material:[x.material];E.forEach(function(O){var W,F,b,j,$,Y,k,c,ae,ee,J,ne,R;(W=O.map)===null||W===void 0||W.dispose(),(F=O.lightMap)===null||F===void 0||F.dispose(),(b=O.bumpMap)===null||b===void 0||b.dispose(),(j=O.normalMap)===null||j===void 0||j.dispose(),($=O.specularMap)===null||$===void 0||$.dispose(),(Y=O.envMap)===null||Y===void 0||Y.dispose(),(k=O.alphaMap)===null||k===void 0||k.dispose(),(c=O.aoMap)===null||c===void 0||c.dispose(),(ae=O.displacementMap)===null||ae===void 0||ae.dispose(),(ee=O.emissiveMap)===null||ee===void 0||ee.dispose(),(J=O.gradientMap)===null||J===void 0||J.dispose(),(ne=O.metalnessMap)===null||ne===void 0||ne.dispose(),(R=O.roughnessMap)===null||R===void 0||R.dispose(),O.dispose()})}}},175:function(C,L,y){y.d(L,{wf:function(){return O.Z}});var P=y(666),x=y.n(P),E=null,O=y(182),W=y(949);function F(R){if(R.material){var N=Array.isArray(R.material)?R.material:[R.material];N.forEach(function(B){var H,G;(H=B.color)===null||H===void 0||H.convertSRGBToLinear(),(G=B.emissive)===null||G===void 0||G.convertSRGBToLinear(),B.map&&(B.map.encoding=THREE.sRGBEncoding),B.emissiveMap&&(B.emissiveMap.encoding=THREE.sRGBEncoding)})}}var b=y(568),j=y(924),$=R=>{var N={};return y.d(N,R),N},Y=R=>()=>R,k=$({get:()=>Ye.get,set:()=>Ye.set}),c=y(620),ae=null,ee=null,J=function(){var R=(0,b.Z)(x().mark(function N(B,H){var G,I,Z,re,ue,me;return x().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return G=H.version,T.next=4,(0,k.get)(B);case 4:if(Z=T.sent,!(Z&&Z[G])){T.next=9;break}I=Z[G],T.next=15;break;case 9:return T.next=11,(0,c.Z)(fetch(B).then(function(ye){if(ye.ok)return ye.blob();throw new Error}));case 11:re=T.sent,ue=re.res,me=re.err,me||(I=ue,(0,k.set)(B,(0,j.Z)({},G,ue)));case 15:return T.abrupt("return",I?{url:URL.createObjectURL(I)}:{url:B});case 16:case"end":return T.stop()}},N)}));return function(B,H){return R.apply(this,arguments)}}(),ne=y(977)},620:function(C,L,y){y.d(L,{Z:function(){return x}});var P=y(42);function x(E){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return E.then(function(W){return(0,P.Z)({err:null,res:W},O)}).catch(function(W){return(0,P.Z)({err:W,res:void 0},O)})}},977:function(C,L,y){y.d(L,{y:function(){return E}});var P=y(949),x=new Map,E=function(W){return{generateTopUV:function(F,b,j,$,Y){var k=b[j*3],c=b[j*3+1],ae=b[$*3],ee=b[$*3+1],J=b[Y*3],ne=b[Y*3+1],R;if(x.has(F))R=x.get(F);else{var N=W&&W.box3||new P.Box3;if(!W||!W.box3){var B=F.parameters.shapes.getPoints();N.setFromArray(B.map(function(Z){return[Z.x,Z.y,0]}).flat())}var H=N.getSize(new P.Vector3);R={box:N,size:H},x.set(F,R)}var G=R.box,I=R.size;return[new P.Vector2((k-G.min.x)/I.x,(c-G.min.y)/I.y),new P.Vector2((ae-G.min.x)/I.x,(ee-G.min.y)/I.y),new P.Vector2((J-G.min.x)/I.x,(ne-G.min.y)/I.y)]},generateSideWallUV:function(F,b,j,$,Y,k){var c=b[j*3],ae=b[j*3+1],ee=b[j*3+2],J=b[$*3],ne=b[$*3+1],R=b[$*3+2],N=b[Y*3],B=b[Y*3+1],H=b[Y*3+2],G=b[k*3],I=b[k*3+1],Z=b[k*3+2],re;if(x.has(b))re=x.get(b);else{var ue=new P.Box3;ue.setFromArray(b);var me=ue.getSize(new P.Vector3);re={box:ue,size:me},x.set(b,re)}var q=re.box,T=re.size;return Math.abs(ae-ne)<.01?[new P.Vector2((c-q.min.x)/T.x,(ee-q.min.z)/T.z),new P.Vector2((J-q.min.x)/T.x,(R-q.min.z)/T.z),new P.Vector2((N-q.min.x)/T.x,(H-q.min.z)/T.z),new P.Vector2((G-q.min.x)/T.x,(Z-q.min.z)/T.z)]:[new P.Vector2((ae-q.min.y)/T.x,(ee-q.min.z)/T.z),new P.Vector2((ne-q.min.y)/T.x,(R-q.min.z)/T.z),new P.Vector2((B-q.min.y)/T.x,(H-q.min.z)/T.z),new P.Vector2((I-q.min.y)/T.x,(Z-q.min.z)/T.z)]}}},O=function(){x.clear()}},949:function(C,L,y){var P=E=>{var O={};return y.d(O,E),O},x=E=>()=>E;C.exports=P({Box3:()=>V.Box3,BufferAttribute:()=>V.BufferAttribute,BufferGeometry:()=>V.BufferGeometry,CanvasTexture:()=>V.CanvasTexture,Color:()=>V.Color,DoubleSide:()=>V.DoubleSide,ExtrudeBufferGeometry:()=>V.ExtrudeBufferGeometry,Float32BufferAttribute:()=>V.Float32BufferAttribute,Group:()=>V.Group,LineSegments:()=>V.LineSegments,Matrix4:()=>V.Matrix4,Mesh:()=>V.Mesh,MeshBasicMaterial:()=>V.MeshBasicMaterial,NormalBlending:()=>V.NormalBlending,PlaneBufferGeometry:()=>V.PlaneBufferGeometry,PlaneGeometry:()=>V.PlaneGeometry,Points:()=>V.Points,RGBAFormat:()=>V.RGBAFormat,Ray:()=>V.Ray,ShaderChunk:()=>V.ShaderChunk,ShaderMaterial:()=>V.ShaderMaterial,Shape:()=>V.Shape,Sphere:()=>V.Sphere,Sprite:()=>V.Sprite,SpriteMaterial:()=>V.SpriteMaterial,Texture:()=>V.Texture,TextureLoader:()=>V.TextureLoader,UniformsLib:()=>V.UniformsLib,Vector2:()=>V.Vector2,Vector3:()=>V.Vector3,VideoTexture:()=>V.VideoTexture})},568:function(C,L,y){y.d(L,{Z:function(){return x}});function P(E,O,W,F,b,j,$){try{var Y=E[j]($),k=Y.value}catch(c){W(c);return}Y.done?O(k):Promise.resolve(k).then(F,b)}function x(E){return function(){var O=this,W=arguments;return new Promise(function(F,b){var j=E.apply(O,W);function $(k){P(j,F,b,$,Y,"next",k)}function Y(k){P(j,F,b,$,Y,"throw",k)}$(void 0)})}}},924:function(C,L,y){y.d(L,{Z:function(){return P}});function P(x,E,O){return E in x?Object.defineProperty(x,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):x[E]=O,x}},42:function(C,L,y){y.d(L,{Z:function(){return x}});var P=y(924);function x(E){for(var O=1;O<arguments.length;O++){var W=arguments[O]!=null?arguments[O]:{},F=Object.keys(W);typeof Object.getOwnPropertySymbols=="function"&&(F=F.concat(Object.getOwnPropertySymbols(W).filter(function(b){return Object.getOwnPropertyDescriptor(W,b).enumerable}))),F.forEach(function(b){(0,P.Z)(E,b,W[b])})}return E}}},Qe={};function U(C){var L=Qe[C];if(L!==void 0)return L.exports;var y=Qe[C]={exports:{}};return It[C](y,y.exports,U),y.exports}(function(){U.n=function(C){var L=C&&C.__esModule?function(){return C.default}:function(){return C};return U.d(L,{a:L}),L}})(),function(){U.d=function(C,L){for(var y in L)U.o(L,y)&&!U.o(C,y)&&Object.defineProperty(C,y,{enumerable:!0,get:L[y]})}}(),function(){U.o=function(C,L){return Object.prototype.hasOwnProperty.call(C,L)}}();var fe={};(function(){U.d(fe,{Ei:function(){return Lt},Yo:function(){return jt},Ee:function(){return ie},x1:function(){return st},VJ:function(){return he},r7:function(){return De},XA:function(){return Ie},NB:function(){return qe},xv:function(){return A},nk:function(){return Me}});function C(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function L(e,n){return L=Object.setPrototypeOf||function(i,a){return i.__proto__=a,i},L(e,n)}function y(e,n){return L(e,n)}function P(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&y(e,n)}var x=U(42);function E(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function O(e,n){return n=n!=null?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}),e}function W(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},F(e)}function b(e){return F(e)}function j(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $(e){return e&&e.constructor===Symbol?"symbol":typeof e}function Y(e,n){return n&&($(n)==="object"||typeof n=="function")?n:j(e)}function k(e){var n=W();return function(){var i=b(e),a;if(n){var t=b(this).constructor;a=Reflect.construct(i,arguments,t)}else a=i.apply(this,arguments);return Y(this,a)}}var c=U(949);function ae(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function ee(e,n,r){return ae()?ee=Reflect.construct:ee=function(a,t,o){var u=[null];u.push.apply(u,t);var h=Function.bind.apply(a,u),v=new h;return o&&y(v,o.prototype),v},ee.apply(null,arguments)}function J(e,n,r){return ee.apply(null,arguments)}function ne(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function R(e,n,r){return n&&ne(e.prototype,n),r&&ne(e,r),e}function N(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=new Array(n);r<n;r++)i[r]=e[r];return i}function B(e){if(Array.isArray(e))return N(e)}function H(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function G(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function I(e,n){if(!!e){if(typeof e=="string")return N(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N(e,n)}}function Z(e){return B(e)||H(e)||I(e)||G()}var re=U(620);function ue(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r={};return r.promise=new Promise(function(i,a){r.resolve=i,r.reject=a}),e&&(r.promise=(0,re.Z)(r.promise,n)),r}var me=e=>{var n={};return U.d(n,e),n},q=e=>()=>e,T=me({CSS2DObject:()=>zt.CSS2DObject}),ye=e=>{var n={};return U.d(n,e),n},Re=e=>()=>e,Le=ye({CSS3DObject:()=>Je.CSS3DObject,CSS3DSprite:()=>Je.CSS3DSprite}),l=U(175),s=function(e){e&&((0,l.wf)(e),e.children.forEach(function(n){n.userData.BaseObject_||s(n)}))},p=function(){"use strict";function e(){C(this,e),this.objecttype__="BaseObject",this.userData={},this.pm=ue(),this.visible=!1}var n=e.prototype;return n.init=function(){},n.create=function(){},n.render=function(){},n.update=function(i,a){},n.resize=function(i,a){},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 i=arguments.length,a=new Array(i),t=0;t<i;t++)a[t]=arguments[t];return this.object3d=J(c.Mesh,Z(a)),this},n.createGroup=function(){return this.object3d=new c.Group,this},n.createPoints=function(){for(var i=arguments.length,a=new Array(i),t=0;t<i;t++)a[t]=arguments[t];return this.object3d=J(c.Points,Z(a)),this},n.createCSS2DObject=function(i){return this.object3d=new T.CSS2DObject(i),this},n.createCSS3DObject=function(i){return this.object3d=new Le.CSS3DObject(i),this},n.createCSS3DSprite=function(i){return this.object3d=new Le.CSS3DSprite(i),this},n.createSprite=function(i){return this.object3d=new c.Sprite(i),this},n.add=function(){for(var i=arguments.length,a=new Array(i),t=0;t<i;t++)a[t]=arguments[t];var o;return(o=this.object3d).add.apply(o,Z(a)),this},n.remove=function(){for(var i=arguments.length,a=new Array(i),t=0;t<i;t++)a[t]=arguments[t];var o;return(o=this.object3d).remove.apply(o,Z(a)),this},n.getSize=function(){var i=new c.Box3().setFromObject(this.object3d);return{min:i.min,max:i.max,size:i.getSize(new c.Vector3)}},n.traverse=function(i){i(this),this.children.forEach(function(a){a.traverse(i)})},n.dispose=function(){s(this.object3d)},R(e,[{key:"parent",get:function(){var i=this.object3d.parent;return(i==null?void 0:i.userData.BaseObject_)||this.pencil.scene}},{key:"children",get:function(){return this.object3d.children.map(function(i){return i.userData.BaseObject_}).filter(function(i){return!!i})}}]),e}(),A=function(e){"use strict";P(r,e);var n=k(r);function r(a){C(this,r);var t;return t=n.call(this),t.width=0,t.canvas=document.createElement("canvas"),t.options=(0,x.Z)({},{scale:.5,fontSize:28,fontFamily:"system-ui,-apple-system,BlinkMacSystemFont,sans-serif",fontWeight:"normal",flipX:!1,sprite:!1,sizeAttenuation:!0},a),t}var i=r.prototype;return i.create=function(){var t=this.options,o=t.position,u=t.lookAt,h=t.sprite,v=t.text,d=t.sizeAttenuation;if(h){var m=new c.Sprite(new c.SpriteMaterial({transparent:!0,sizeAttenuation:d}));this.object3d=m}else{var g=new c.MeshBasicMaterial({side:c.DoubleSide,transparent:!0}),M=new c.PlaneGeometry(1,1,1,1);this.createMesh(M,g)}this.object3d.position.copy(o),u&&this.object3d.lookAt(u),this.setText(v)},i.setText=function(t,o){var u=(0,x.Z)(O((0,x.Z)({},this.options),{text:t}),o||{}),h=u.text,v=u.fontSize,d=u.fontFamily,m=u.fontWeight,g=u.flipX,M=u.scale,w=this.canvas;w.width=v*h.length*2,w.height=v;var S=w.getContext("2d");S.font="".concat(m," ").concat(v,"px/1 ").concat(d);var f=S.measureText(h).width;w.width=f,this.width=f,S=w.getContext("2d"),S.clearRect(0,0,w.width,w.height),g&&S.scale(-1,1),S.font="".concat(m," ").concat(v,"px/1 ").concat(d),S.textBaseline="middle",S.fillStyle="#ffffff",S.fillText(h,g?f*-1:0,w.height/2),S.restore();var z=new c.Texture(w);z.anisotropy=16,z.needsUpdate=!0;var D=this.object3d;D.material.map&&D.material.map.dispose(),D.material.map=z,D.material.needsUpdate=!0,D.scale.set(z.image.width*M,z.image.height*M,1)},r}(p),_=U(568),Q=U(666),X=U.n(Q),ie=function(e){"use strict";P(r,e);var n=k(r);function r(a){C(this,r);var t;return t=n.call(this),t.options=a,t}var i=r.prototype;return i.getMaterial=function(){var t=this;return(0,_.Z)(X().mark(function o(){var u,h,v,d,m,g,M,w,S,f;return X().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return u=t.options,h=u.transparent,v=u.blending,d=u.src,m=u.depthWrite,g=u.alphaTest,M=u.sprite,w=u.sizeAttenuation,D.next=3,new c.TextureLoader().loadAsync(d);case 3:return S=D.sent,f=M?new c.SpriteMaterial({map:S,transparent:h!=null?h:!1,blending:v!=null?v:c.NormalBlending,depthWrite:m!=null?m:!0,alphaTest:g!=null?g:0,sizeAttenuation:w!=null?w:!0}):new c.MeshBasicMaterial({map:S,transparent:h!=null?h:!1,blending:v!=null?v:c.NormalBlending,depthWrite:m!=null?m:!0,alphaTest:g!=null?g:0}),D.abrupt("return",f);case 6:case"end":return D.stop()}},o)}))()},i.create=function(){var t=this;return(0,_.Z)(X().mark(function o(){var u,h,v,d,m,g,M,w;return X().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(u=t.options,h=u.scale,v=u.position,d=u.src,m=u.cache,g=u.sprite,!(m&&!m.get(d))){f.next=7;break}return m.init(d),f.next=5,t.getMaterial();case 5:M=f.sent,m.set(d,M);case 7:if(!m){f.next=13;break}return f.next=10,m.get(d);case 10:f.t0=f.sent,f.next=16;break;case 13:return f.next=15,t.getMaterial();case 15:f.t0=f.sent;case 16:w=f.t0,t.texture=w.map,g?t.createSprite(w):t.createMesh(new c.PlaneBufferGeometry(1,1),w),h&&t.setScale(h),v&&t.object3d.position.copy(v);case 21:case"end":return f.stop()}},o)}))()},i.setScale=function(t){this.object3d.scale.set(this.texture.image.width*t,this.texture.image.height*t,1)},r}(p);function oe(e,n){for(;!Object.prototype.hasOwnProperty.call(e,n)&&(e=b(e),e!==null););return e}function te(e,n,r){return typeof Reflect!="undefined"&&Reflect.get?te=Reflect.get:te=function(a,t,o){var u=oe(a,t);if(!!u){var h=Object.getOwnPropertyDescriptor(u,t);return h.get?h.get.call(o||a):h.value}},te(e,n,r)}function xe(e,n,r){return te(e,n,r)}var Me=function(e){"use strict";P(r,e);var n=k(r);function r(a){C(this,r);var t;return t=n.call(this),t.options=(0,x.Z)({},{autoPlay:!0,loop:!0},a),t}var i=r.prototype;return i.getMaterial=function(){var t=this.options,o=t.src,u=t.transparent,h=t.blending,v=t.depthWrite,d=t.format,m=t.autoPlay,g=t.loop,M=t.alphaTest,w=t.sprite,S=ue(),f=document.createElement("video");return f.addEventListener("loadedmetadata",function(){var z=new c.VideoTexture(f);z.format=d!=null?d:c.RGBAFormat,z.needsUpdate=!0;var D=w?new c.SpriteMaterial({map:z,transparent:u!=null?u:!1,blending:h!=null?h:c.NormalBlending,depthWrite:v!=null?v:!0,alphaTest:M!=null?M:0}):new c.MeshBasicMaterial({map:z,transparent:u!=null?u:!1,blending:h!=null?h:c.NormalBlending,depthWrite:v!=null?v:!0,alphaTest:M!=null?M:0});S.resolve(D)},!1),f.src=o,f.muted=!0,f.autoplay=m,f.loop=g,f.preload="auto",S.promise},i.create=function(){var t=this;return(0,_.Z)(X().mark(function o(){var u,h,v,d,m,g,M,w;return X().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(u=t.options,h=u.scale,v=u.position,d=u.src,m=u.cache,g=u.sprite,!(m&&!m.get(d))){f.next=7;break}return m.init(d),f.next=5,t.getMaterial();case 5:M=f.sent,m.set(d,M);case 7:if(!m){f.next=13;break}return f.next=10,m.get(d);case 10:f.t0=f.sent,f.next=16;break;case 13:return f.next=15,t.getMaterial();case 15:f.t0=f.sent;case 16:w=f.t0,t.video=w.map.image,g?t.createSprite(w):t.createMesh(new c.PlaneBufferGeometry(1,1),w),h&&t.setScale(h),v&&t.object3d.position.copy(v);case 21:case"end":return f.stop()}},o)}))()},i.setScale=function(t){this.object3d.scale.set(this.video.videoWidth*t,this.video.videoHeight*t,1)},i.render=function(){var t=this.options.autoPlay;t&&this.video.play()},i.dispose=function(){this.video.pause(),this.video.src="",this.video.load(),xe(b(r.prototype),"dispose",this).call(this)},r}(p),_e=function(e){"use strict";P(r,e);var n=k(r);function r(a){C(this,r);var t;return t=n.call(this),t.options=(0,x.Z)({},a),t}var i=r.prototype;return i.create=function(){var t=this.options,o=t.position,u=t.children,h=t.onClick,v=t.zIndexFix,d=document.createElement("div");this.element=d,d.appendChild(u),this.createCSS2DObject(d),o&&this.object3d.position.copy(o),h&&this.clickTarge.forEach(function(m){m.addEventListener("click",h)}),v&&(this.object3d.userData.zIndexFix=v)},i.getMaterial=function(t){return(0,_.Z)(X().mark(function o(){var u,h,v,d;return X().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return u=document.createElement("canvas"),u.width=256,u.height=256,h=u.getContext("2d"),h.fillStyle="#ff0000",h.fillRect(0,0,256,256),v=new c.CanvasTexture(u),d=new c.SpriteMaterial({map:v,opacity:t?1:0,transparent:!0,alphaTest:.1,sizeAttenuation:!1}),g.abrupt("return",d);case 9:case"end":return g.stop()}},o)}))()},i.createPickObject=function(t){var o=t.show,u=o===void 0?!1:o,h=t.scale,v=h===void 0?new c.Vector3(1,1,1):h,d=t.position,m=d===void 0?new c.Vector3(0,0,0):d,g=t.cache,M=this;return(0,_.Z)(X().mark(function w(){var S,f,z,D;return X().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:if(S="node-create-pick-object",!(g&&!g.get(S))){K.next=7;break}return g.init(S),K.next=5,M.getMaterial(u);case 5:f=K.sent,g.set(S,f);case 7:if(!g){K.next=13;break}return K.next=10,g.get(S);case 10:K.t0=K.sent,K.next=16;break;case 13:return K.next=15,M.getMaterial(u);case 15:K.t0=K.sent;case 16:z=K.t0,D=new c.Sprite(z),D.scale.set(z.map.image.width*v.x,z.map.image.height*v.y,1),D.position.copy(m),M.add(D),M.pickObject=D;case 22:case"end":return K.stop()}},w)}))()},i.dispose=function(){var t=this.options.onClick;t&&this.clickTarge.forEach(function(o){o.removeEventListener("click",t)}),xe(b(r.prototype),"dispose",this).call(this)},R(r,[{key:"clickTarge",get:function(){var t=this,o=this.options.clickTarge;if(o){var u=o.map(function(h){return Z(t.element.querySelectorAll(h))}).flat();return u}return[this.element]}}]),r}(p),qe=_e,et=`
|
|
2
2
|
`.concat(c.ShaderChunk.logdepthbuf_pars_vertex,`
|
|
3
3
|
`).concat(c.ShaderChunk.fog_pars_vertex,`
|
|
4
4
|
attribute vec3 previous;
|
|
@@ -129,4 +129,4 @@ void main() {
|
|
|
129
129
|
gl_FragColor.a *= step(vCounters, visibility);
|
|
130
130
|
`).concat(c.ShaderChunk.fog_fragment,`
|
|
131
131
|
}
|
|
132
|
-
`),he=function(e){"use strict";P(r,e);var n=R(r);function r(){C(this,r);var i;return i=n.call(this),i.isMeshLine=!0,i.type="MeshLine",i.positions=[],i.previous=[],i.next=[],i.side=[],i.width=[],i.indices_array=[],i.uvs=[],i.counters=[],i._points=[],i._geom=null,i.widthCallback=null,i.matrixWorld=new c.Matrix4,Object.defineProperties(j(i),{geometry:{enumerable:!0,get:function(){return this}},geom:{enumerable:!0,get:function(){return this._geom},set:function(t){this.setGeometry(t,this.widthCallback)}},points:{enumerable:!0,get:function(){return this._points},set:function(t){this.setPoints(t,this.widthCallback)}}}),i}return r}(c.BufferGeometry);he.prototype.setMatrixWorld=function(e){this.matrixWorld=e},he.prototype.setGeometry=function(e,n){this._geometry=e,this.setPoints(e.getAttribute("position").array,n)},he.prototype.setPoints=function(e,n){if(!(e instanceof Float32Array)&&!(e instanceof Array)){console.error("ERROR: The BufferArray of points is not instancied correctly.");return}if(this._points=e,this.widthCallback=n,this.positions=[],this.counters=[],e.length&&e[0]instanceof c.Vector3)for(var r=0;r<e.length;r++){var i=e[r],a=r/e.length;this.positions.push(i.x,i.y,i.z),this.positions.push(i.x,i.y,i.z),this.counters.push(a),this.counters.push(a)}else for(var r=0;r<e.length;r+=3){var a=r/e.length;this.positions.push(e[r],e[r+1],e[r+2]),this.positions.push(e[r],e[r+1],e[r+2]),this.counters.push(a),this.counters.push(a)}this.process()};function Ie(e,n){var r=new c.Matrix4,i=new c.Ray,a=new c.Sphere,t=new c.Vector3,o=this.geometry;if(o.boundingSphere||o.computeBoundingSphere(),a.copy(o.boundingSphere),a.applyMatrix4(this.matrixWorld),e.ray.intersectSphere(a,t)!==!1){r.copy(this.matrixWorld).invert(),i.copy(e.ray).applyMatrix4(r);var u=new c.Vector3,h=new c.Vector3,v=new c.Vector3,d=this instanceof c.LineSegments?2:1,_=o.index,g=o.attributes;if(_!==null)for(var M=_.array,w=g.position.array,S=g.width.array,f=0,z=M.length-1;f<z;f+=d){var D=M[f],se=M[f+1];u.fromArray(w,D*3),h.fromArray(w,se*3);var K=S[Math.floor(f/3)]!==void 0?S[Math.floor(f/3)]:1,ve=e.params.Line.threshold+this.material.lineWidth*K/2,Oe=ve*ve,Se=i.distanceSqToSegment(u,h,t,v);if(!(Se>Oe)){t.applyMatrix4(this.matrixWorld);var be=e.ray.origin.distanceTo(t);be<e.near||be>e.far||(n.push({distance:be,point:v.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}),f=z)}}}}he.prototype.raycast=Ie,he.prototype.compareV3=function(e,n){var r=e*6,i=n*6;return this.positions[r]===this.positions[i]&&this.positions[r+1]===this.positions[i+1]&&this.positions[r+2]===this.positions[i+2]},he.prototype.copyV3=function(e){var n=e*6;return[this.positions[n],this.positions[n+1],this.positions[n+2]]},he.prototype.process=function(){var e=this.positions.length/6;this.previous=[],this.next=[],this.side=[],this.width=[],this.indices_array=[],this.uvs=[];var n,r;this.compareV3(0,e-1)?r=this.copyV3(e-2):r=this.copyV3(0),this.previous.push(r[0],r[1],r[2]),this.previous.push(r[0],r[1],r[2]);for(var i=0;i<e;i++){if(this.side.push(1),this.side.push(-1),this.widthCallback?n=this.widthCallback(i/(e-1)):n=1,this.width.push(n),this.width.push(n),this.uvs.push(i/(e-1),0),this.uvs.push(i/(e-1),1),i<e-1){r=this.copyV3(i),this.previous.push(r[0],r[1],r[2]),this.previous.push(r[0],r[1],r[2]);var a=i*2;this.indices_array.push(a,a+1,a+2),this.indices_array.push(a+2,a+1,a+3)}i>0&&(r=this.copyV3(i),this.next.push(r[0],r[1],r[2]),this.next.push(r[0],r[1],r[2]))}this.compareV3(e-1,0)?r=this.copyV3(1):r=this.copyV3(e-1),this.next.push(r[0],r[1],r[2]),this.next.push(r[0],r[1],r[2]),!this._attributes||this._attributes.position.count!==this.positions.length?this._attributes={position:new c.BufferAttribute(new Float32Array(this.positions),3),previous:new c.BufferAttribute(new Float32Array(this.previous),3),next:new c.BufferAttribute(new Float32Array(this.next),3),side:new c.BufferAttribute(new Float32Array(this.side),1),width:new c.BufferAttribute(new Float32Array(this.width),1),uv:new c.BufferAttribute(new Float32Array(this.uvs),2),index:new c.BufferAttribute(new Uint16Array(this.indices_array),1),counters:new c.BufferAttribute(new Float32Array(this.counters),1)}:(this._attributes.position.copyArray(new Float32Array(this.positions)),this._attributes.position.needsUpdate=!0,this._attributes.previous.copyArray(new Float32Array(this.previous)),this._attributes.previous.needsUpdate=!0,this._attributes.next.copyArray(new Float32Array(this.next)),this._attributes.next.needsUpdate=!0,this._attributes.side.copyArray(new Float32Array(this.side)),this._attributes.side.needsUpdate=!0,this._attributes.width.copyArray(new Float32Array(this.width)),this._attributes.width.needsUpdate=!0,this._attributes.uv.copyArray(new Float32Array(this.uvs)),this._attributes.uv.needsUpdate=!0,this._attributes.index.copyArray(new Uint16Array(this.indices_array)),this._attributes.index.needsUpdate=!0),this.setAttribute("position",this._attributes.position),this.setAttribute("previous",this._attributes.previous),this.setAttribute("next",this._attributes.next),this.setAttribute("side",this._attributes.side),this.setAttribute("width",this._attributes.width),this.setAttribute("uv",this._attributes.uv),this.setAttribute("counters",this._attributes.counters),this.setIndex(this._attributes.index),this.computeBoundingSphere(),this.computeBoundingBox()};function ze(e,n,r,i,a){var t;if(e=e.subarray||e.slice?e:e.buffer,r=r.subarray||r.slice?r:r.buffer,e=n?e.subarray?e.subarray(n,a&&n+a):e.slice(n,a&&n+a):e,r.set)r.set(e,i);else for(t=0;t<e.length;t++)r[t+i]=e[t];return r}he.prototype.advance=function(e){var n=this._attributes.position.array,r=this._attributes.previous.array,i=this._attributes.next.array,a=n.length;ze(n,0,r,0,a),ze(n,6,n,0,a-6),n[a-6]=e.x,n[a-5]=e.y,n[a-4]=e.z,n[a-3]=e.x,n[a-2]=e.y,n[a-1]=e.z,ze(n,6,i,0,a-6),i[a-6]=e.x,i[a-5]=e.y,i[a-4]=e.z,i[a-3]=e.x,i[a-2]=e.y,i[a-1]=e.z,this._attributes.position.needsUpdate=!0,this._attributes.previous.needsUpdate=!0,this._attributes.next.needsUpdate=!0},c.ShaderChunk.meshline_vert=et,c.ShaderChunk.meshline_frag=tt;var De=function(e){"use strict";P(r,e);var n=R(r);function r(i){C(this,r);var a;return a=n.call(this,{uniforms:Object.assign({},c.UniformsLib.fog,{lineWidth:{value:1},map:{value:null},useMap:{value:0},alphaMap:{value:null},useAlphaMap:{value:0},color:{value:new c.Color(16777215)},opacity:{value:1},resolution:{value:new c.Vector2(1,1)},sizeAttenuation:{value:1},dashArray:{value:0},dashOffset:{value:0},dashRatio:{value:.5},useDash:{value:0},visibility:{value:1},alphaTest:{value:0},repeat:{value:new c.Vector2(1,1)},offset:{value:new c.Vector2(1,1)},lineLightAnimation:{value:1},time:{value:0},size:{value:300},speed:{value:.3},lightWidth:{value:.1},uCenter:{value:new c.Vector2(0,0)},lightColor:{value:new c.Color(16777215)}}),vertexShader:c.ShaderChunk.meshline_vert,fragmentShader:c.ShaderChunk.meshline_frag}),a.isMeshLineMaterial=!0,a.type="MeshLineMaterial",Object.defineProperties(j(a),{lineWidth:{enumerable:!0,get:function(){return this.uniforms.lineWidth.value},set:function(o){this.uniforms.lineWidth.value=o}},lineLightAnimation:{enumerable:!0,get:function(){return this.uniforms.lineLightAnimation.value},set:function(o){this.uniforms.lineLightAnimation.value=o}},map:{enumerable:!0,get:function(){return this.uniforms.map.value},set:function(o){this.uniforms.map.value=o}},useMap:{enumerable:!0,get:function(){return this.uniforms.useMap.value},set:function(o){this.uniforms.useMap.value=o}},alphaMap:{enumerable:!0,get:function(){return this.uniforms.alphaMap.value},set:function(o){this.uniforms.alphaMap.value=o}},useAlphaMap:{enumerable:!0,get:function(){return this.uniforms.useAlphaMap.value},set:function(o){this.uniforms.useAlphaMap.value=o}},color:{enumerable:!0,get:function(){return this.uniforms.color.value},set:function(o){this.uniforms.color.value=o}},lightColor:{enumerable:!0,get:function(){return this.uniforms.lightColor.value},set:function(o){this.uniforms.lightColor.value=o}},time:{enumerable:!0,get:function(){return this.uniforms.time.value},set:function(o){this.uniforms.time.value=o}},uCenter:{enumerable:!0,get:function(){return this.uniforms.uCenter.value},set:function(o){this.uniforms.uCenter.value=o}},size:{enumerable:!0,get:function(){return this.uniforms.size.value},set:function(o){this.uniforms.size.value=o}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(o){this.uniforms.opacity.value=o}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(o){this.uniforms.resolution.value.copy(o)}},sizeAttenuation:{enumerable:!0,get:function(){return this.uniforms.sizeAttenuation.value},set:function(o){this.uniforms.sizeAttenuation.value=o}},dashArray:{enumerable:!0,get:function(){return this.uniforms.dashArray.value},set:function(o){this.uniforms.dashArray.value=o,this.useDash=o!==0?1:0}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(o){this.uniforms.dashOffset.value=o}},dashRatio:{enumerable:!0,get:function(){return this.uniforms.dashRatio.value},set:function(o){this.uniforms.dashRatio.value=o}},useDash:{enumerable:!0,get:function(){return this.uniforms.useDash.value},set:function(o){this.uniforms.useDash.value=o}},visibility:{enumerable:!0,get:function(){return this.uniforms.visibility.value},set:function(o){this.uniforms.visibility.value=o}},alphaTest:{enumerable:!0,get:function(){return this.uniforms.alphaTest.value},set:function(o){this.uniforms.alphaTest.value=o}},repeat:{enumerable:!0,get:function(){return this.uniforms.repeat.value},set:function(o){this.uniforms.repeat.value.copy(o)}}}),a.setValues(i),a}return r}(c.ShaderMaterial);De.prototype.copy=function(e){return c.ShaderMaterial.prototype.copy.call(this,e),this.lineWidth=e.lineWidth,this.map=e.map,this.useMap=e.useMap,this.alphaMap=e.alphaMap,this.useAlphaMap=e.useAlphaMap,this.color.copy(e.color),this.opacity=e.opacity,this.resolution.copy(e.resolution),this.sizeAttenuation=e.sizeAttenuation,this.dashArray.copy(e.dashArray),this.dashOffset.copy(e.dashOffset),this.dashRatio.copy(e.dashRatio),this.useDash=e.useDash,this.visibility=e.visibility,this.alphaTest=e.alphaTest,this.repeat.copy(e.repeat),this};function rt(e,n){if(e==null)return{};var r={},i=Object.keys(e),a,t;for(t=0;t<i.length;t++)a=i[t],!(n.indexOf(a)>=0)&&(r[a]=e[a]);return r}function nt(e,n){if(e==null)return{};var r=rt(e,n),i,a;if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);for(a=0;a<t.length;a++)i=t[a],!(n.indexOf(i)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,i)||(r[i]=e[i]))}return r}var it=e=>{var n={};return U.d(n,e),n},tr=e=>()=>e,at=it({animate:()=>Dt.animate}),ot={nodes:[],color:new c.Color("red"),lineWidth:3,sizeAttenuation:0},st=function(e){"use strict";P(r,e);var n=R(r);function r(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};C(this,r);var t;return t=n.call(this),t.geometry=new c.BufferGeometry,t.meshline=new he,t.options=(0,x.Z)({},ot,a),t}var i=r.prototype;return i.create=function(){var t=this.options,o=t.nodes,u=t.duration,h=t.delay,v=t.onComplete,d=t.setPointWidth,_=nt(t,["nodes","duration","delay","onComplete","setPointWidth"]),g=this.pencil.getSize(),M=g.width,w=g.height;delete _.key,this.geometry.setFromPoints(o),this.meshline.setGeometry(this.geometry,d);var S=new De(O((0,x.Z)({},_),{resolution:new c.Vector2(M,w)}));this.material=S,this.createMesh(this.meshline,S)},i.resize=function(t,o){this.material.uniforms.resolution.value.set(t,o)},i.animate=function(){var t=this.options,o=t.duration,u=t.delay,h=t.onComplete,v=this.material.uniforms.offset,d=u!=null?u:0,_=(0,at.animate)({from:v.value,to:{x:0},duration:o!=null?o:1e3,elapsed:-d,repeat:1/0,onComplete:h,onUpdate:function(g){v.value=g}});this.tween=_},i.dispose=function(){xe(b(r.prototype),"dispose",this).call(this),this.tween.stop()},r}(p);function ut(e){if(Array.isArray(e))return e}function ct(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function pe(e,n){return ut(e)||X(e,n)||I(e,n)||ct()}var lt=e=>{var n={};return U.d(n,e),n},rr=e=>()=>e,Pe=lt({extent:()=>Fe.extent,mean:()=>Fe.mean,merge:()=>Fe.merge}),ft=e=>{var n={};return U.d(n,e),n},nr=e=>()=>e,Ve=ft({default:()=>Vt.default}),ht=e=>{var n={};return U.d(n,e),n},ir=e=>()=>e,pt=ht({default:()=>Wt.default});function vt(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=(90-n)*Math.PI/180,a=(90-e)*Math.PI/180;return[r*Math.sin(i)*Math.cos(a),r*Math.cos(i),r*Math.sin(i)*Math.sin(a)]}var dt=e=>{var n={};return U.d(n,e),n},ar=e=>()=>e,mt=dt({default:()=>Gt.default}),_t=e=>{var n={};return U.d(n,e),n},or=e=>()=>e,gt=_t({default:()=>Ut.default}),yt=e=>{var n={};return U.d(n,e),n},sr=e=>()=>e,Ee=yt({geoBounds:()=>Te.geoBounds,geoContains:()=>Te.geoContains,geoDistance:()=>Te.geoDistance,geoInterpolate:()=>Te.geoInterpolate}),bt=e=>{var n={};return U.d(n,e),n},ur=e=>()=>e,wt=bt({geoVoronoi:()=>Nt.geoVoronoi}),xt=e=>{var n={};return U.d(n,e),n},cr=e=>()=>e,Ze=xt({scaleLinear:()=>Ft.scaleLinear});function Mt(e,n){return e.map(function(r){var i=[],a;return r.forEach(function(t){if(a){var o=(0,Ee.geoDistance)(t,a)*180/Math.PI;if(o>n)for(var u=(0,Ee.geoInterpolate)(a,t),h=1/Math.ceil(o/n),v=h;v<1;)i.push(u(v)),v+=h}i.push(a=t)}),i})}function St(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.minLng,i=n.maxLng,a=n.minLat,t=n.maxLat,o=Math.round(Math.pow(360/e,2)/Math.PI),u=(1+Math.sqrt(5))/2,h=function(f){return f/u*360%360-180},v=function(f){return Math.acos(2*f/o-1)/Math.PI*180-90},d=function(f){return o*(Math.cos((f+90)*Math.PI/180)+1)/2},_=[t!==void 0?Math.ceil(d(t)):0,a!==void 0?Math.floor(d(a)):o-1],g=r===void 0&&i===void 0?function(){return!0}:r===void 0?function(f){return f<=i}:i===void 0?function(f){return f>=r}:i>=r?function(f){return f>=r&&f<=i}:function(f){return f>=r||f<=i},M=[],w=_[0];w<=_[1];w++){var S=h(w);g(S)&&M.push([S,v(w)])}return M}function We(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return r?(0,Ee.geoContains)(n,e):(0,gt.default)(e,n)}function At(e,n){var r={type:"Polygon",coordinates:e},i=pe((0,Ee.geoBounds)(r),2),a=pe(i[0],2),t=a[0],o=a[1],u=pe(i[1],2),h=u[0],v=u[1];if(Math.min(Math.abs(h-t),Math.abs(v-o))<n)return[];var d=t>h||v>=89||o<=-89;return St(n,{minLng:t,maxLng:h,minLat:o,maxLat:v}).filter(function(_){return We(_,r,d)})}function Pt(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.resolution,i=r===void 0?1/0:r,a=Mt(e,i),t=(0,Pe.merge)(a),o=At(e,i),u=H(t).concat(H(o)),h={type:"Polygon",coordinates:e},v=pe((0,Ee.geoBounds)(h),2),d=pe(v[0],2),_=d[0],g=d[1],M=pe(v[1],2),w=M[0],S=M[1],f=_>w||S>=89||g<=-89,z=[];if(f){var D=(0,wt.geoVoronoi)(u).triangles(),se=new Map(u.map(function(ce,we){var ge=pe(ce,2),le=ge[0],Re=ge[1];return["".concat(le,"-").concat(Re),we]}));D.features.forEach(function(ce){var we,ge=ce.geometry.coordinates[0].slice(0,3).reverse(),le=[];if(ge.forEach(function(Be){var de=pe(Be,2),Ne=de[0],Tt=de[1],$e="".concat(Ne,"-").concat(Tt);se.has($e)&&le.push(se.get($e))}),le.length===3){if(le.some(function(Be){return Be<t.length})){var Re=ce.properties.circumcenter;if(!We(Re,h,f))return}(we=z).push.apply(we,H(le))}})}else if(o.length)for(var be=function(ce,we){var ge,le=[2,1,0].map(function(de){return Ae.triangles[ce+de]}),Re=le.map(function(de){return u[de]});if(le.some(function(de){return de<t.length})){var Be=[0,1].map(function(de){return(0,Pe.mean)(Re,function(Ne){return Ne[de]})});if(!We(Be,h,f))return"continue"}(ge=z).push.apply(ge,H(le))},Ae=mt.default.from(u),Ce=0,je=Ae.triangles.length;Ce<je;Ce+=3)be(Ce,je);else{var K=Ve.default.flatten(a),ve=K.vertices,Oe=K.holes,Se=Oe===void 0?[]:Oe;z=(0,Ve.default)(ve,Se,2)}var Ue=(0,Ze.scaleLinear)((0,Pe.extent)(u,function(ce){return ce[0]}),[0,1]),Rt=(0,Ze.scaleLinear)((0,Pe.extent)(u,function(ce){return ce[1]}),[0,1]),Bt=u.map(function(ce){var we=pe(ce,2),ge=we[0],le=we[1];return[Ue(ge),Rt(le)]}),kt={points:u,indices:z,uvs:Bt};return{contour:a,triangles:kt}}var Ot=Pt,Xe=new c.BufferGeometry().setAttribute?"setAttribute":"addAttribute";function Ge(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=e.map(function(a){return a.map(function(t){var o=pe(t,2),u=o[0],h=o[1];return r?vt(u,h,n):[u,h,n]})});return Ve.default.flatten(i)}function He(e,n,r){for(var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=Ge(e,n,i),t=a.vertices,o=a.holes,u=Ge(e,r,i),h=u.vertices,v=(0,Pe.merge)([h,t]),d=Math.round(h.length/3),_=new Set(o),g=0,M=[],w=0;w<d;w++){var S=w+1;if(S===d)S=g;else if(_.has(S)){var f=S;S=g,g=f}M.push(w,w+d,S+d),M.push(S+d,S,w)}for(var z=[],D=1;D>=0;D--)for(var se=0;se<d;se+=1)z.push(se/(d-1),D);return{indices:M,vertices:v,uvs:z,topVerts:h}}function Ke(e,n,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return{indices:i?e.indices:e.indices.slice().reverse(),vertices:Ge([e.points],n,a).vertices,uvs:r}}var Ct=function(e){"use strict";P(r,e);var n=R(r);function r(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};C(this,r);var t;t=n.call(this),t.type="PolygonBufferGeometry",t.parameters=(0,x.Z)({},{polygonGeoJson:i,startHeight:0,endHeight:1,closedBottom:!0,closedTop:!0,includeSides:!0,curvatureResolution:5,cartesian:!0,userDataRsoOffset:0},a);var o=t.parameters,u=o.startHeight,h=o.endHeight,v=o.closedBottom,d=o.closedTop,_=o.includeSides,g=o.curvatureResolution,M=o.cartesian,w=o.userDataRsoOffset;(0,pt.default)(i[0])||i[0].reverse();var S=Ot(i,{resolution:g}),f=S.contour,z=S.triangles,D=(0,Pe.merge)(z.uvs),se=[],K=[],ve=[],Oe=0,Se=function(Ae){var Ce=Math.round(se.length/3),je=ve.length;se=se.concat(Ae.vertices),K=K.concat(Ae.uvs),ve=ve.concat(Ce?Ae.indices.map(function(Ue){return Ue+Ce}):Ae.indices),t.addGroup(je,ve.length-je,Oe++)};if(_){var be=He(f,u,h,M);Se(be),t.userData.rso=w?He(f,u,h+w,M):be}return v&&Se(Ke(z,u,D,!1,M)),d&&Se(Ke(z,h,D,!0,M)),t.setIndex(ve),t[Xe]("position",new c.Float32BufferAttribute(se,3)),t[Xe]("uv",new c.Float32BufferAttribute(K,2)),t.computeVertexNormals(),t}return r}(c.BufferGeometry),Lt=function(e){"use strict";P(r,e);var n=R(r);function r(a){C(this,r);var t;return t=n.call(this),t.options=(0,x.Z)({},{geojson:[[[]]],startHeight:0,height:5,closedBottom:!0,closedTop:!0,curvatureResolution:1,cartesian:!0,userDataRsoOffset:0},a),t}var i=r.prototype;return i.create=function(){var t=this.options,o=t.startHeight,u=t.height,h=t.closedBottom,v=t.closedTop,d=t.curvatureResolution,_=t.userDataRsoOffset,g=t.cartesian,M=new Ct(this.options.geojson,{startHeight:o,endHeight:o+u,closedBottom:h,closedTop:v,curvatureResolution:d,cartesian:g,userDataRsoOffset:_});this.createMesh(M,this.options.material)},r}(p),Et=U(977),jt=function(e){"use strict";P(r,e);var n=R(r);function r(a){C(this,r);var t;return t=n.call(this),t.options=(0,x.Z)({},a),t}var i=r.prototype;return i.create=function(){var t=this.options,o=t.points,u=t.depth,h=t.material,v=new c.ExtrudeBufferGeometry(new c.Shape(o),{depth:u,bevelEnabled:!1,UVGenerator:(0,Et.y)()});this.createMesh(v,h)},r}(p)})();var Zt=fe.Ei,Xt=fe.Yo,Ht=fe.Ee,Kt=fe.x1,$t=fe.VJ,Yt=fe.r7,Jt=fe.XA,Qt=fe.NB,qt=fe.xv,er=fe.nk;export{Zt as ConicPolygon,Xt as ExtrudePolygon,Ht as Image,Kt as Line,$t as MeshLine,Yt as MeshLineMaterial,Jt as MeshLineRaycast,Qt as Node,qt as Text,er as Video};
|
|
132
|
+
`),he=function(e){"use strict";P(r,e);var n=k(r);function r(){C(this,r);var i;return i=n.call(this),i.isMeshLine=!0,i.type="MeshLine",i.positions=[],i.previous=[],i.next=[],i.side=[],i.width=[],i.indices_array=[],i.uvs=[],i.counters=[],i._points=[],i._geom=null,i.widthCallback=null,i.matrixWorld=new c.Matrix4,Object.defineProperties(j(i),{geometry:{enumerable:!0,get:function(){return this}},geom:{enumerable:!0,get:function(){return this._geom},set:function(t){this.setGeometry(t,this.widthCallback)}},points:{enumerable:!0,get:function(){return this._points},set:function(t){this.setPoints(t,this.widthCallback)}}}),i}return r}(c.BufferGeometry);he.prototype.setMatrixWorld=function(e){this.matrixWorld=e},he.prototype.setGeometry=function(e,n){this._geometry=e,this.setPoints(e.getAttribute("position").array,n)},he.prototype.setPoints=function(e,n){if(!(e instanceof Float32Array)&&!(e instanceof Array)){console.error("ERROR: The BufferArray of points is not instancied correctly.");return}if(this._points=e,this.widthCallback=n,this.positions=[],this.counters=[],e.length&&e[0]instanceof c.Vector3)for(var r=0;r<e.length;r++){var i=e[r],a=r/e.length;this.positions.push(i.x,i.y,i.z),this.positions.push(i.x,i.y,i.z),this.counters.push(a),this.counters.push(a)}else for(var r=0;r<e.length;r+=3){var a=r/e.length;this.positions.push(e[r],e[r+1],e[r+2]),this.positions.push(e[r],e[r+1],e[r+2]),this.counters.push(a),this.counters.push(a)}this.process()};function Ie(e,n){var r=new c.Matrix4,i=new c.Ray,a=new c.Sphere,t=new c.Vector3,o=this.geometry;if(o.boundingSphere||o.computeBoundingSphere(),a.copy(o.boundingSphere),a.applyMatrix4(this.matrixWorld),e.ray.intersectSphere(a,t)!==!1){r.copy(this.matrixWorld).invert(),i.copy(e.ray).applyMatrix4(r);var u=new c.Vector3,h=new c.Vector3,v=new c.Vector3,d=this instanceof c.LineSegments?2:1,m=o.index,g=o.attributes;if(m!==null)for(var M=m.array,w=g.position.array,S=g.width.array,f=0,z=M.length-1;f<z;f+=d){var D=M[f],se=M[f+1];u.fromArray(w,D*3),h.fromArray(w,se*3);var K=S[Math.floor(f/3)]!==void 0?S[Math.floor(f/3)]:1,ve=e.params.Line.threshold+this.material.lineWidth*K/2,Oe=ve*ve,Se=i.distanceSqToSegment(u,h,t,v);if(!(Se>Oe)){t.applyMatrix4(this.matrixWorld);var be=e.ray.origin.distanceTo(t);be<e.near||be>e.far||(n.push({distance:be,point:v.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}),f=z)}}}}he.prototype.raycast=Ie,he.prototype.compareV3=function(e,n){var r=e*6,i=n*6;return this.positions[r]===this.positions[i]&&this.positions[r+1]===this.positions[i+1]&&this.positions[r+2]===this.positions[i+2]},he.prototype.copyV3=function(e){var n=e*6;return[this.positions[n],this.positions[n+1],this.positions[n+2]]},he.prototype.process=function(){var e=this.positions.length/6;this.previous=[],this.next=[],this.side=[],this.width=[],this.indices_array=[],this.uvs=[];var n,r;this.compareV3(0,e-1)?r=this.copyV3(e-2):r=this.copyV3(0),this.previous.push(r[0],r[1],r[2]),this.previous.push(r[0],r[1],r[2]);for(var i=0;i<e;i++){if(this.side.push(1),this.side.push(-1),this.widthCallback?n=this.widthCallback(i/(e-1)):n=1,this.width.push(n),this.width.push(n),this.uvs.push(i/(e-1),0),this.uvs.push(i/(e-1),1),i<e-1){r=this.copyV3(i),this.previous.push(r[0],r[1],r[2]),this.previous.push(r[0],r[1],r[2]);var a=i*2;this.indices_array.push(a,a+1,a+2),this.indices_array.push(a+2,a+1,a+3)}i>0&&(r=this.copyV3(i),this.next.push(r[0],r[1],r[2]),this.next.push(r[0],r[1],r[2]))}this.compareV3(e-1,0)?r=this.copyV3(1):r=this.copyV3(e-1),this.next.push(r[0],r[1],r[2]),this.next.push(r[0],r[1],r[2]),!this._attributes||this._attributes.position.count!==this.positions.length?this._attributes={position:new c.BufferAttribute(new Float32Array(this.positions),3),previous:new c.BufferAttribute(new Float32Array(this.previous),3),next:new c.BufferAttribute(new Float32Array(this.next),3),side:new c.BufferAttribute(new Float32Array(this.side),1),width:new c.BufferAttribute(new Float32Array(this.width),1),uv:new c.BufferAttribute(new Float32Array(this.uvs),2),index:new c.BufferAttribute(new Uint16Array(this.indices_array),1),counters:new c.BufferAttribute(new Float32Array(this.counters),1)}:(this._attributes.position.copyArray(new Float32Array(this.positions)),this._attributes.position.needsUpdate=!0,this._attributes.previous.copyArray(new Float32Array(this.previous)),this._attributes.previous.needsUpdate=!0,this._attributes.next.copyArray(new Float32Array(this.next)),this._attributes.next.needsUpdate=!0,this._attributes.side.copyArray(new Float32Array(this.side)),this._attributes.side.needsUpdate=!0,this._attributes.width.copyArray(new Float32Array(this.width)),this._attributes.width.needsUpdate=!0,this._attributes.uv.copyArray(new Float32Array(this.uvs)),this._attributes.uv.needsUpdate=!0,this._attributes.index.copyArray(new Uint16Array(this.indices_array)),this._attributes.index.needsUpdate=!0),this.setAttribute("position",this._attributes.position),this.setAttribute("previous",this._attributes.previous),this.setAttribute("next",this._attributes.next),this.setAttribute("side",this._attributes.side),this.setAttribute("width",this._attributes.width),this.setAttribute("uv",this._attributes.uv),this.setAttribute("counters",this._attributes.counters),this.setIndex(this._attributes.index),this.computeBoundingSphere(),this.computeBoundingBox()};function ze(e,n,r,i,a){var t;if(e=e.subarray||e.slice?e:e.buffer,r=r.subarray||r.slice?r:r.buffer,e=n?e.subarray?e.subarray(n,a&&n+a):e.slice(n,a&&n+a):e,r.set)r.set(e,i);else for(t=0;t<e.length;t++)r[t+i]=e[t];return r}he.prototype.advance=function(e){var n=this._attributes.position.array,r=this._attributes.previous.array,i=this._attributes.next.array,a=n.length;ze(n,0,r,0,a),ze(n,6,n,0,a-6),n[a-6]=e.x,n[a-5]=e.y,n[a-4]=e.z,n[a-3]=e.x,n[a-2]=e.y,n[a-1]=e.z,ze(n,6,i,0,a-6),i[a-6]=e.x,i[a-5]=e.y,i[a-4]=e.z,i[a-3]=e.x,i[a-2]=e.y,i[a-1]=e.z,this._attributes.position.needsUpdate=!0,this._attributes.previous.needsUpdate=!0,this._attributes.next.needsUpdate=!0},c.ShaderChunk.meshline_vert=et,c.ShaderChunk.meshline_frag=tt;var De=function(e){"use strict";P(r,e);var n=k(r);function r(i){C(this,r);var a;return a=n.call(this,{uniforms:Object.assign({},c.UniformsLib.fog,{lineWidth:{value:1},map:{value:null},useMap:{value:0},alphaMap:{value:null},useAlphaMap:{value:0},color:{value:new c.Color(16777215)},opacity:{value:1},resolution:{value:new c.Vector2(1,1)},sizeAttenuation:{value:1},dashArray:{value:0},dashOffset:{value:0},dashRatio:{value:.5},useDash:{value:0},visibility:{value:1},alphaTest:{value:0},repeat:{value:new c.Vector2(1,1)},offset:{value:new c.Vector2(1,1)},lineLightAnimation:{value:1},time:{value:0},size:{value:300},speed:{value:.3},lightWidth:{value:.1},uCenter:{value:new c.Vector2(0,0)},lightColor:{value:new c.Color(16777215)}}),vertexShader:c.ShaderChunk.meshline_vert,fragmentShader:c.ShaderChunk.meshline_frag}),a.isMeshLineMaterial=!0,a.type="MeshLineMaterial",Object.defineProperties(j(a),{lineWidth:{enumerable:!0,get:function(){return this.uniforms.lineWidth.value},set:function(o){this.uniforms.lineWidth.value=o}},lineLightAnimation:{enumerable:!0,get:function(){return this.uniforms.lineLightAnimation.value},set:function(o){this.uniforms.lineLightAnimation.value=o}},map:{enumerable:!0,get:function(){return this.uniforms.map.value},set:function(o){this.uniforms.map.value=o}},useMap:{enumerable:!0,get:function(){return this.uniforms.useMap.value},set:function(o){this.uniforms.useMap.value=o}},alphaMap:{enumerable:!0,get:function(){return this.uniforms.alphaMap.value},set:function(o){this.uniforms.alphaMap.value=o}},useAlphaMap:{enumerable:!0,get:function(){return this.uniforms.useAlphaMap.value},set:function(o){this.uniforms.useAlphaMap.value=o}},color:{enumerable:!0,get:function(){return this.uniforms.color.value},set:function(o){this.uniforms.color.value=o}},lightColor:{enumerable:!0,get:function(){return this.uniforms.lightColor.value},set:function(o){this.uniforms.lightColor.value=o}},time:{enumerable:!0,get:function(){return this.uniforms.time.value},set:function(o){this.uniforms.time.value=o}},uCenter:{enumerable:!0,get:function(){return this.uniforms.uCenter.value},set:function(o){this.uniforms.uCenter.value=o}},size:{enumerable:!0,get:function(){return this.uniforms.size.value},set:function(o){this.uniforms.size.value=o}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(o){this.uniforms.opacity.value=o}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(o){this.uniforms.resolution.value.copy(o)}},sizeAttenuation:{enumerable:!0,get:function(){return this.uniforms.sizeAttenuation.value},set:function(o){this.uniforms.sizeAttenuation.value=o}},dashArray:{enumerable:!0,get:function(){return this.uniforms.dashArray.value},set:function(o){this.uniforms.dashArray.value=o,this.useDash=o!==0?1:0}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(o){this.uniforms.dashOffset.value=o}},dashRatio:{enumerable:!0,get:function(){return this.uniforms.dashRatio.value},set:function(o){this.uniforms.dashRatio.value=o}},useDash:{enumerable:!0,get:function(){return this.uniforms.useDash.value},set:function(o){this.uniforms.useDash.value=o}},visibility:{enumerable:!0,get:function(){return this.uniforms.visibility.value},set:function(o){this.uniforms.visibility.value=o}},alphaTest:{enumerable:!0,get:function(){return this.uniforms.alphaTest.value},set:function(o){this.uniforms.alphaTest.value=o}},repeat:{enumerable:!0,get:function(){return this.uniforms.repeat.value},set:function(o){this.uniforms.repeat.value.copy(o)}}}),a.setValues(i),a}return r}(c.ShaderMaterial);De.prototype.copy=function(e){return c.ShaderMaterial.prototype.copy.call(this,e),this.lineWidth=e.lineWidth,this.map=e.map,this.useMap=e.useMap,this.alphaMap=e.alphaMap,this.useAlphaMap=e.useAlphaMap,this.color.copy(e.color),this.opacity=e.opacity,this.resolution.copy(e.resolution),this.sizeAttenuation=e.sizeAttenuation,this.dashArray.copy(e.dashArray),this.dashOffset.copy(e.dashOffset),this.dashRatio.copy(e.dashRatio),this.useDash=e.useDash,this.visibility=e.visibility,this.alphaTest=e.alphaTest,this.repeat.copy(e.repeat),this};function rt(e,n){if(e==null)return{};var r={},i=Object.keys(e),a,t;for(t=0;t<i.length;t++)a=i[t],!(n.indexOf(a)>=0)&&(r[a]=e[a]);return r}function nt(e,n){if(e==null)return{};var r=rt(e,n),i,a;if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);for(a=0;a<t.length;a++)i=t[a],!(n.indexOf(i)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,i)||(r[i]=e[i]))}return r}var it=e=>{var n={};return U.d(n,e),n},tr=e=>()=>e,at=it({animate:()=>Dt.animate}),ot={nodes:[],color:new c.Color("red"),lineWidth:3,sizeAttenuation:0},st=function(e){"use strict";P(r,e);var n=k(r);function r(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};C(this,r);var t;return t=n.call(this),t.geometry=new c.BufferGeometry,t.meshline=new he,t.options=(0,x.Z)({},ot,a),t}var i=r.prototype;return i.create=function(){var t=this.options,o=t.nodes,u=t.duration,h=t.delay,v=t.onComplete,d=t.setPointWidth,m=nt(t,["nodes","duration","delay","onComplete","setPointWidth"]),g=this.pencil.getSize(),M=g.width,w=g.height;delete m.key,this.geometry.setFromPoints(o),this.meshline.setGeometry(this.geometry,d);var S=new De(O((0,x.Z)({},m),{resolution:new c.Vector2(M,w)}));this.material=S,this.createMesh(this.meshline,S)},i.resize=function(t,o){this.material.uniforms.resolution.value.set(t,o)},i.animate=function(){var t=this.options,o=t.duration,u=t.delay,h=t.onComplete,v=this.material.uniforms.offset,d=u!=null?u:0,m=(0,at.animate)({from:v.value,to:{x:0},duration:o!=null?o:1e3,elapsed:-d,repeat:1/0,onComplete:h,onUpdate:function(g){v.value=g}});this.tween=m},i.dispose=function(){xe(b(r.prototype),"dispose",this).call(this),this.tween.stop()},r}(p);function ut(e){if(Array.isArray(e))return e}function ct(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function pe(e,n){return ut(e)||H(e,n)||I(e,n)||ct()}var lt=e=>{var n={};return U.d(n,e),n},rr=e=>()=>e,Pe=lt({extent:()=>Fe.extent,mean:()=>Fe.mean,merge:()=>Fe.merge}),ft=e=>{var n={};return U.d(n,e),n},nr=e=>()=>e,Ve=ft({default:()=>Vt.default}),ht=e=>{var n={};return U.d(n,e),n},ir=e=>()=>e,pt=ht({default:()=>Wt.default});function vt(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=(90-n)*Math.PI/180,a=(90-e)*Math.PI/180;return[r*Math.sin(i)*Math.cos(a),r*Math.cos(i),r*Math.sin(i)*Math.sin(a)]}var dt=e=>{var n={};return U.d(n,e),n},ar=e=>()=>e,mt=dt({default:()=>Gt.default}),_t=e=>{var n={};return U.d(n,e),n},or=e=>()=>e,gt=_t({default:()=>Ut.default}),yt=e=>{var n={};return U.d(n,e),n},sr=e=>()=>e,Ee=yt({geoBounds:()=>Be.geoBounds,geoContains:()=>Be.geoContains,geoDistance:()=>Be.geoDistance,geoInterpolate:()=>Be.geoInterpolate}),bt=e=>{var n={};return U.d(n,e),n},ur=e=>()=>e,wt=bt({geoVoronoi:()=>Nt.geoVoronoi}),xt=e=>{var n={};return U.d(n,e),n},cr=e=>()=>e,Ze=xt({scaleLinear:()=>Ft.scaleLinear});function Mt(e,n){return e.map(function(r){var i=[],a;return r.forEach(function(t){if(a){var o=(0,Ee.geoDistance)(t,a)*180/Math.PI;if(o>n)for(var u=(0,Ee.geoInterpolate)(a,t),h=1/Math.ceil(o/n),v=h;v<1;)i.push(u(v)),v+=h}i.push(a=t)}),i})}function St(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.minLng,i=n.maxLng,a=n.minLat,t=n.maxLat,o=Math.round(Math.pow(360/e,2)/Math.PI),u=(1+Math.sqrt(5))/2,h=function(f){return f/u*360%360-180},v=function(f){return Math.acos(2*f/o-1)/Math.PI*180-90},d=function(f){return o*(Math.cos((f+90)*Math.PI/180)+1)/2},m=[t!==void 0?Math.ceil(d(t)):0,a!==void 0?Math.floor(d(a)):o-1],g=r===void 0&&i===void 0?function(){return!0}:r===void 0?function(f){return f<=i}:i===void 0?function(f){return f>=r}:i>=r?function(f){return f>=r&&f<=i}:function(f){return f>=r||f<=i},M=[],w=m[0];w<=m[1];w++){var S=h(w);g(S)&&M.push([S,v(w)])}return M}function We(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return r?(0,Ee.geoContains)(n,e):(0,gt.default)(e,n)}function At(e,n){var r={type:"Polygon",coordinates:e},i=pe((0,Ee.geoBounds)(r),2),a=pe(i[0],2),t=a[0],o=a[1],u=pe(i[1],2),h=u[0],v=u[1];if(Math.min(Math.abs(h-t),Math.abs(v-o))<n)return[];var d=t>h||v>=89||o<=-89;return St(n,{minLng:t,maxLng:h,minLat:o,maxLat:v}).filter(function(m){return We(m,r,d)})}function Pt(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.resolution,i=r===void 0?1/0:r,a=Mt(e,i),t=(0,Pe.merge)(a),o=At(e,i),u=Z(t).concat(Z(o)),h={type:"Polygon",coordinates:e},v=pe((0,Ee.geoBounds)(h),2),d=pe(v[0],2),m=d[0],g=d[1],M=pe(v[1],2),w=M[0],S=M[1],f=m>w||S>=89||g<=-89,z=[];if(f){var D=(0,wt.geoVoronoi)(u).triangles(),se=new Map(u.map(function(ce,we){var ge=pe(ce,2),le=ge[0],ke=ge[1];return["".concat(le,"-").concat(ke),we]}));D.features.forEach(function(ce){var we,ge=ce.geometry.coordinates[0].slice(0,3).reverse(),le=[];if(ge.forEach(function(Te){var de=pe(Te,2),Ne=de[0],Bt=de[1],$e="".concat(Ne,"-").concat(Bt);se.has($e)&&le.push(se.get($e))}),le.length===3){if(le.some(function(Te){return Te<t.length})){var ke=ce.properties.circumcenter;if(!We(ke,h,f))return}(we=z).push.apply(we,Z(le))}})}else if(o.length)for(var be=function(ce,we){var ge,le=[2,1,0].map(function(de){return Ae.triangles[ce+de]}),ke=le.map(function(de){return u[de]});if(le.some(function(de){return de<t.length})){var Te=[0,1].map(function(de){return(0,Pe.mean)(ke,function(Ne){return Ne[de]})});if(!We(Te,h,f))return"continue"}(ge=z).push.apply(ge,Z(le))},Ae=mt.default.from(u),Ce=0,je=Ae.triangles.length;Ce<je;Ce+=3)be(Ce,je);else{var K=Ve.default.flatten(a),ve=K.vertices,Oe=K.holes,Se=Oe===void 0?[]:Oe;z=(0,Ve.default)(ve,Se,2)}var Ue=(0,Ze.scaleLinear)((0,Pe.extent)(u,function(ce){return ce[0]}),[0,1]),kt=(0,Ze.scaleLinear)((0,Pe.extent)(u,function(ce){return ce[1]}),[0,1]),Tt=u.map(function(ce){var we=pe(ce,2),ge=we[0],le=we[1];return[Ue(ge),kt(le)]}),Rt={points:u,indices:z,uvs:Tt};return{contour:a,triangles:Rt}}var Ot=Pt,Xe=new c.BufferGeometry().setAttribute?"setAttribute":"addAttribute";function Ge(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=e.map(function(a){return a.map(function(t){var o=pe(t,2),u=o[0],h=o[1];return r?vt(u,h,n):[u,h,n]})});return Ve.default.flatten(i)}function He(e,n,r){for(var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=Ge(e,n,i),t=a.vertices,o=a.holes,u=Ge(e,r,i),h=u.vertices,v=(0,Pe.merge)([h,t]),d=Math.round(h.length/3),m=new Set(o),g=0,M=[],w=0;w<d;w++){var S=w+1;if(S===d)S=g;else if(m.has(S)){var f=S;S=g,g=f}M.push(w,w+d,S+d),M.push(S+d,S,w)}for(var z=[],D=1;D>=0;D--)for(var se=0;se<d;se+=1)z.push(se/(d-1),D);return{indices:M,vertices:v,uvs:z,topVerts:h}}function Ke(e,n,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return{indices:i?e.indices:e.indices.slice().reverse(),vertices:Ge([e.points],n,a).vertices,uvs:r}}var Ct=function(e){"use strict";P(r,e);var n=k(r);function r(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};C(this,r);var t;t=n.call(this),t.type="PolygonBufferGeometry",t.parameters=(0,x.Z)({},{polygonGeoJson:i,startHeight:0,endHeight:1,closedBottom:!0,closedTop:!0,includeSides:!0,curvatureResolution:5,cartesian:!0,userDataRsoOffset:0},a);var o=t.parameters,u=o.startHeight,h=o.endHeight,v=o.closedBottom,d=o.closedTop,m=o.includeSides,g=o.curvatureResolution,M=o.cartesian,w=o.userDataRsoOffset;(0,pt.default)(i[0])||i[0].reverse();var S=Ot(i,{resolution:g}),f=S.contour,z=S.triangles,D=(0,Pe.merge)(z.uvs),se=[],K=[],ve=[],Oe=0,Se=function(Ae){var Ce=Math.round(se.length/3),je=ve.length;se=se.concat(Ae.vertices),K=K.concat(Ae.uvs),ve=ve.concat(Ce?Ae.indices.map(function(Ue){return Ue+Ce}):Ae.indices),t.addGroup(je,ve.length-je,Oe++)};if(m){var be=He(f,u,h,M);Se(be),t.userData.rso=w?He(f,u,h+w,M):be}return v&&Se(Ke(z,u,D,!1,M)),d&&Se(Ke(z,h,D,!0,M)),t.setIndex(ve),t[Xe]("position",new c.Float32BufferAttribute(se,3)),t[Xe]("uv",new c.Float32BufferAttribute(K,2)),t.computeVertexNormals(),t}return r}(c.BufferGeometry),Lt=function(e){"use strict";P(r,e);var n=k(r);function r(a){C(this,r);var t;return t=n.call(this),t.options=(0,x.Z)({},{geojson:[[[]]],startHeight:0,height:5,closedBottom:!0,closedTop:!0,curvatureResolution:1,cartesian:!0,userDataRsoOffset:0},a),t}var i=r.prototype;return i.create=function(){var t=this.options,o=t.startHeight,u=t.height,h=t.closedBottom,v=t.closedTop,d=t.curvatureResolution,m=t.userDataRsoOffset,g=t.cartesian,M=new Ct(this.options.geojson,{startHeight:o,endHeight:o+u,closedBottom:h,closedTop:v,curvatureResolution:d,cartesian:g,userDataRsoOffset:m});this.createMesh(M,this.options.material)},r}(p),Et=U(977),jt=function(e){"use strict";P(r,e);var n=k(r);function r(a){C(this,r);var t;return t=n.call(this),t.options=(0,x.Z)({},a),t}var i=r.prototype;return i.create=function(){var t=this.options,o=t.points,u=t.depth,h=t.material,v=new c.ExtrudeBufferGeometry(new c.Shape(o),{depth:u,bevelEnabled:!1,UVGenerator:(0,Et.y)()});this.createMesh(v,h)},r}(p)})();var Zt=fe.Ei,Xt=fe.Yo,Ht=fe.Ee,Kt=fe.x1,$t=fe.VJ,Yt=fe.r7,Jt=fe.XA,Qt=fe.NB,qt=fe.xv,er=fe.nk;export{Zt as ConicPolygon,Xt as ExtrudePolygon,Ht as Image,Kt as Line,$t as MeshLine,Yt as MeshLineMaterial,Jt as MeshLineRaycast,Qt as Node,qt as Text,er as Video};
|
|
@@ -6,13 +6,16 @@ interface Options {
|
|
|
6
6
|
children: HTMLElement;
|
|
7
7
|
position?: THREE.Vector3;
|
|
8
8
|
onClick?: (event: MouseEvent) => void;
|
|
9
|
+
clickTarge?: string[];
|
|
9
10
|
zIndexFix?: number;
|
|
10
11
|
}
|
|
11
12
|
export declare class Node extends BaseObject {
|
|
12
13
|
options: Options;
|
|
13
14
|
pickObject?: THREE.Sprite;
|
|
14
15
|
object3d: CSS2DObject;
|
|
16
|
+
element: HTMLDivElement;
|
|
15
17
|
constructor(options: Options);
|
|
18
|
+
get clickTarge(): HTMLDivElement[];
|
|
16
19
|
create(): void;
|
|
17
20
|
getMaterial(show: boolean): Promise<THREE.SpriteMaterial>;
|
|
18
21
|
createPickObject({ show, scale, position, cache, }: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gl-draw",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"author": "gitplus <hstits@gmail.com>",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "PORT=3002 bundler-dev",
|
|
@@ -23,11 +23,15 @@
|
|
|
23
23
|
"import": "./dist/plugins/index.module.js",
|
|
24
24
|
"require": "./dist/plugins/index.js"
|
|
25
25
|
},
|
|
26
|
+
"./dist/effect": {
|
|
27
|
+
"import": "./dist/effect/index.module.js",
|
|
28
|
+
"require": "./dist/effect/index.js"
|
|
29
|
+
},
|
|
26
30
|
"./dist/utils": {
|
|
27
31
|
"import": "./dist/utils/index.module.js",
|
|
28
32
|
"require": "./dist/utils/index.js"
|
|
29
33
|
},
|
|
30
|
-
"./dist/
|
|
34
|
+
"./dist/": "./dist/"
|
|
31
35
|
},
|
|
32
36
|
"files": [
|
|
33
37
|
"dist"
|