gl-draw 0.15.0-beta.43 → 0.15.0-beta.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/objects/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var qe=Object.defineProperty,We=Object.defineProperties;var ke=Object.getOwnPropertyDescriptors;var ae=Object.getOwnPropertySymbols;var Ee=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable;var je=(p,e,t)=>e in p?qe(p,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):p[e]=t,B=(p,e)=>{for(var t in e||(e={}))Ee.call(e,t)&&je(p,t,e[t]);if(ae)for(var t of ae(e))Be.call(e,t)&&je(p,t,e[t]);return p},ce=(p,e)=>We(p,ke(e));var de=(p,e)=>{var t={};for(var n in p)Ee.call(p,n)&&e.indexOf(n)<0&&(t[n]=p[n]);if(p!=null&&ae)for(var n of ae(p))e.indexOf(n)<0&&Be.call(p,n)&&(t[n]=p[n]);return t};var ne=(p,e,t)=>new Promise((n,s)=>{var i=r=>{try{g(t.next(r))}catch(u){s(u)}},a=r=>{try{g(t.throw(r))}catch(u){s(u)}},g=r=>r.done?n(r.value):Promise.resolve(r.value).then(i,a);g((t=t.apply(p,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../index2.js"),c=require("three"),Fe=require("@tweenjs/tween.js"),Ye=require("three/examples/jsm/lights/RectAreaLightUniformsLib"),me=require("three/examples/jsm/utils/BufferGeometryUtils"),Ze=require("three/examples/jsm/lines/LineSegments2"),Oe=require("three/examples/jsm/lines/LineSegmentsGeometry"),Ie=require("three/examples/jsm/lines/LineMaterial"),Pe=require("../uvGenerator.js"),le=require("three-bvh-csg");function $e(p){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const t in p)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(p,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>p[t]})}}return e.default=p,Object.freeze(e)}const K=$e(Fe);class Je extends P.BaseObject{constructor(e){super(),this.objectType="BaseObject#Node",this.onNodePointerIndex=[],this.options=B({type:"2d"},e)}create(){const{position:e,children:t}=this.options,n=document.createElement("div");this.element=n,t&&n.appendChild(t),this.options.type==="3d"?this.createCSS3DObject(n):this.options.type==="3dSprite"?this.createCSS3DSprite(n):this.createCSS2DObject(n),e&&this.object3d.position.copy(e)}setChildren(e){this.options.children=e,this.element.innerHTML="",this.element.appendChild(e)}showAndEnsureVisible(){const e=this.options.children;e&&(e.style.visibility="hidden",this.show(),setTimeout(()=>{e.style.visibility="",this.ensureVisible()}))}moveElementToViewport(){const e=this.options.children;if(!e)return;const t=e.getBoundingClientRect(),n=window.innerWidth,s=window.innerHeight;let i=0,a=0;t.left<0?i=-t.left:t.right>n&&(i=n-t.right),t.top<0?a=-t.top:t.bottom>s&&(a=s-t.bottom),t.left+i<0&&(i=-t.left),t.top+a<0&&(a=-t.top),(i!==0||a!==0)&&(e.style.transform=`translate(${i}px, ${a}px)`)}ensureVisible(){const e=this.options.children;if(!e)return;e.style.transform&&(e.style.transform="");const t=new IntersectionObserver(n=>{n.forEach(s=>{s.isIntersecting&&(this.moveElementToViewport(),t.disconnect())})});t.observe(e)}onPointerEvent(e,t){const n=this.lead.handlePickNode([this],e,t);this.onNodePointerIndex.push(n)}dispose(){this.onNodePointerIndex.forEach(e=>{this.lead.removePickNode(e)}),super.dispose()}}class Qe extends P.BaseObject{create(){this.createGroup()}}const Ke={ArcCurve:c.ArcCurve,CatmullRomCurve3:c.CatmullRomCurve3,CubicBezierCurve:c.CubicBezierCurve,CubicBezierCurve3:c.CubicBezierCurve3,EllipseCurve:c.EllipseCurve,LineCurve:c.LineCurve,LineCurve3:c.LineCurve3,QuadraticBezierCurve:c.QuadraticBezierCurve,QuadraticBezierCurve3:c.QuadraticBezierCurve3,SplineCurve:c.SplineCurve};class $ extends c.BufferGeometry{constructor(e=new c.Shape([new c.Vector2(.5,.5),new c.Vector2(-.5,.5),new c.Vector2(-.5,-.5),new c.Vector2(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,s=[],i=[];for(let g=0,r=e.length;g<r;g++){const u=e[g];a(u)}this.setAttribute("position",new c.Float32BufferAttribute(s,3)),this.setAttribute("uv",new c.Float32BufferAttribute(i,2)),this.computeVertexNormals();function a(g){var ve,Se,Ae;const r=[],u=t.curveSegments!==void 0?t.curveSegments:12,o=t.steps!==void 0?t.steps:1,h=t.depth!==void 0?t.depth:1;let w=t.bevelEnabled!==void 0?t.bevelEnabled:!0,f=t.bevelThickness!==void 0?t.bevelThickness:.2,x=t.bevelSize!==void 0?t.bevelSize:f-.1,C=t.bevelOffset!==void 0?t.bevelOffset:0,L=t.bevelSegments!==void 0?t.bevelSegments:3;const M=t.extrudePath,E=t.UVGenerator!==void 0?t.UVGenerator:et,S=(ve=t.hasTop)!=null?ve:!0,I=(Se=t.hasBottom)!=null?Se:!0,he=(Ae=t.hasSide)!=null?Ae:!0;let k,J=!1,F,ee,te,D;M&&(k=M.getSpacedPoints(o),J=!0,w=!1,F=M.computeFrenetFrames(o,!1),ee=new c.Vector3,te=new c.Vector3,D=new c.Vector3),w||(L=0,f=0,x=0,C=0);const ge=g.extractPoints(u);let O=ge.shape;const _=ge.holes;if(!c.ShapeUtils.isClockWise(O)){O=O.reverse();for(let l=0,d=_.length;l<d;l++){const m=_[l];c.ShapeUtils.isClockWise(m)&&(_[l]=m.reverse())}}function ye(l){const m=10000000000000001e-36;let b=l[0];for(let y=1;y<=l.length;y++){const A=y%l.length,v=l[A],T=v.x-b.x,G=v.y-b.y,j=T*T+G*G,V=Math.max(Math.abs(v.x),Math.abs(v.y),Math.abs(b.x),Math.abs(b.y)),Z=m*V*V;if(j<=Z){l.splice(A,1),y--;continue}b=v}}ye(O),_.forEach(ye);const ue=_.length,U=O;for(let l=0;l<ue;l++){const d=_[l];O=O.concat(d)}function Q(l,d,m){return d||console.error("THREE.ExtrudeGeometry: vec does not exist"),l.clone().addScaledVector(d,m)}const H=O.length;function be(l,d,m){let b,y,A;const v=l.x-d.x,T=l.y-d.y,G=m.x-l.x,j=m.y-l.y,V=v*v+T*T,Z=v*j-T*G;if(Math.abs(Z)>Number.EPSILON){const z=Math.sqrt(V),Me=Math.sqrt(G*G+j*j),Le=d.x-T/z,Ce=d.y+v/z,Ne=m.x-j/Me,Xe=m.y+G/Me,Te=((Ne-Le)*j-(Xe-Ce)*G)/(v*j-T*G);b=Le+v*Te-l.x,y=Ce+T*Te-l.y;const Ge=b*b+y*y;if(Ge<=2)return new c.Vector2(b,y);A=Math.sqrt(Ge/2)}else{let z=!1;v>Number.EPSILON?G>Number.EPSILON&&(z=!0):v<-Number.EPSILON?G<-Number.EPSILON&&(z=!0):Math.sign(T)===Math.sign(j)&&(z=!0),z?(b=-T,y=v,A=Math.sqrt(V)):(b=v,y=T,A=Math.sqrt(V/2))}return new c.Vector2(b/A,y/A)}const se=[];for(let l=0,d=U.length,m=d-1,b=l+1;l<d;l++,m++,b++)m===d&&(m=0),b===d&&(b=0),se[l]=be(U[l],U[m],U[b]);const fe=[];let W,oe=se.concat();for(let l=0,d=ue;l<d;l++){const m=_[l];W=[];for(let b=0,y=m.length,A=y-1,v=b+1;b<y;b++,A++,v++)A===y&&(A=0),v===y&&(v=0),W[b]=be(m[b],m[A],m[v]);fe.push(W),oe=oe.concat(W)}let Y;if(L===0)Y=c.ShapeUtils.triangulateShape(U,_);else{const l=[],d=[];for(let m=0;m<L;m++){const b=m/L,y=f*Math.cos(b*Math.PI/2),A=x*Math.sin(b*Math.PI/2)+C;for(let v=0,T=U.length;v<T;v++){const G=Q(U[v],se[v],A);N(G.x,G.y,-y),b===0&&l.push(G)}for(let v=0,T=ue;v<T;v++){const G=_[v];W=fe[v];const j=[];for(let V=0,Z=G.length;V<Z;V++){const z=Q(G[V],W[V],A);N(z.x,z.y,-y),b===0&&j.push(z)}b===0&&d.push(j)}}Y=c.ShapeUtils.triangulateShape(l,d)}const ie=Y.length,we=x+C;for(let l=0;l<H;l++){const d=w?Q(O[l],oe[l],we):O[l];J?(te.copy(F.normals[0]).multiplyScalar(d.x),ee.copy(F.binormals[0]).multiplyScalar(d.y),D.copy(k[0]).add(te).add(ee),N(D.x,D.y,D.z)):N(d.x,d.y,0)}for(let l=1;l<=o;l++)for(let d=0;d<H;d++){const m=w?Q(O[d],oe[d],we):O[d];J?(te.copy(F.normals[l]).multiplyScalar(m.x),ee.copy(F.binormals[l]).multiplyScalar(m.y),D.copy(k[l]).add(te).add(ee),N(D.x,D.y,D.z)):N(m.x,m.y,h/o*l)}for(let l=L-1;l>=0;l--){const d=l/L,m=f*Math.cos(d*Math.PI/2),b=x*Math.sin(d*Math.PI/2)+C;for(let y=0,A=U.length;y<A;y++){const v=Q(U[y],se[y],b);N(v.x,v.y,h+m)}for(let y=0,A=_.length;y<A;y++){const v=_[y];W=fe[y];for(let T=0,G=v.length;T<G;T++){const j=Q(v[T],W[T],b);J?N(j.x,j.y+k[o-1].y,k[o-1].x+m):N(j.x,j.y,h+m)}}}Re(),he&&De();function Re(){const l=s.length/3;if(w){let d=0,m=H*d;if(I)for(let b=0;b<ie;b++){const y=Y[b];re(y[2]+m,y[1]+m,y[0]+m)}if(d=o+L*2,m=H*d,S)for(let b=0;b<ie;b++){const y=Y[b];re(y[0]+m,y[1]+m,y[2]+m)}}else{if(I)for(let d=0;d<ie;d++){const m=Y[d];re(m[2],m[1],m[0])}if(S)for(let d=0;d<ie;d++){const m=Y[d];re(m[0]+H*o,m[1]+H*o,m[2]+H*o)}}n.addGroup(l,s.length/3-l,0)}function De(){const l=s.length/3;let d=0;xe(U,d),d+=U.length;for(let m=0,b=_.length;m<b;m++){const y=_[m];xe(y,d),d+=y.length}n.addGroup(l,s.length/3-l,1)}function xe(l,d){let m=l.length;for(;--m>=0;){const b=m;let y=m-1;y<0&&(y=l.length-1);for(let A=0,v=o+L*2;A<v;A++){const T=H*A,G=H*(A+1),j=d+b+T,V=d+y+T,Z=d+y+G,z=d+b+G;He(j,V,Z,z)}}}function N(l,d,m){r.push(l),r.push(d),r.push(m)}function re(l,d,m){X(l),X(d),X(m);const b=s.length/3,y=E.generateTopUV(n,s,b-3,b-2,b-1);q(y[0]),q(y[1]),q(y[2])}function He(l,d,m,b){X(l),X(d),X(b),X(d),X(m),X(b);const y=s.length/3,A=E.generateSideWallUV(n,s,y-6,y-3,y-2,y-1);q(A[0]),q(A[1]),q(A[3]),q(A[1]),q(A[2]),q(A[3])}function X(l){s.push(r[l*3+0]),s.push(r[l*3+1]),s.push(r[l*3+2])}function q(l){i.push(l.x),i.push(l.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes,n=this.parameters.options;return tt(t,n,e)}static fromJSON(e,t){const n=[];for(let i=0,a=e.shapes.length;i<a;i++){const g=t[e.shapes[i]];n.push(g)}const s=e.options.extrudePath;return s!==void 0&&(e.options.extrudePath=new Ke[`${s.type}`]().fromJSON(s)),new $(n,e.options)}}const et={generateTopUV:function(p,e,t,n,s){const i=e[t*3],a=e[t*3+1],g=e[n*3],r=e[n*3+1],u=e[s*3],o=e[s*3+1];return[new c.Vector2(i,a),new c.Vector2(g,r),new c.Vector2(u,o)]},generateSideWallUV:function(p,e,t,n,s,i){const a=e[t*3],g=e[t*3+1],r=e[t*3+2],u=e[n*3],o=e[n*3+1],h=e[n*3+2],w=e[s*3],f=e[s*3+1],x=e[s*3+2],C=e[i*3],L=e[i*3+1],M=e[i*3+2];return Math.abs(g-o)<Math.abs(a-u)?[new c.Vector2(a,1-r),new c.Vector2(u,1-h),new c.Vector2(w,1-x),new c.Vector2(C,1-M)]:[new c.Vector2(g,1-r),new c.Vector2(o,1-h),new c.Vector2(f,1-x),new c.Vector2(L,1-M)]}};function tt(p,e,t){if(t.shapes=[],Array.isArray(p))for(let n=0,s=p.length;n<s;n++){const i=p[n];t.shapes.push(i.uuid)}else t.shapes.push(p.uuid);return t.options=Object.assign({},e),e.extrudePath!==void 0&&(t.options.extrudePath=e.extrudePath.toJSON()),t}class nt extends P.BaseObject{constructor(e){super(),this.options=B({maxDepth:10,percentDepth:!1,innerRadius:25,outRadius:42,activeIndex:-1},e)}create(){return ne(this,null,function*(){this.createGroup();const{data:e,maxDepth:t,colors:n,material:s,percentDepth:i,activeIndex:a}=this.options,g=Math.max(...e),r=e.reduce((o,h)=>o+h,0);let u=Math.PI/2;e.forEach((o,h)=>{if(o===0)return;const w=Math.PI*2*(o/r),f=n[h],x=i?t*(o/g):t,C=this.createGeometry(x,w),L=s?s.clone():new c.MeshBasicMaterial({color:f});s&&L.color.set(f);const M=new c.Mesh(C,L);M.userData.depth=x,M.userData.index=h,M.rotateZ(u),u+=w,this.add(M)}),a!==-1&&this.setActive(a)})}createGeometry(e,t){const{outRadius:n,innerRadius:s}=this.options,i=new c.Shape;return i.moveTo(n,0),i.lineTo(s,0),i.absarc(0,0,s,0,t,!1),i.absarc(0,0,n,t,0,!0),new $(i,{curveSegments:48,depth:e,bevelEnabled:!1})}handlePick(e,t=1.3){const{object:n}=this.pencil.pick(e,this.object3d.children)||{},s=n?this.object3d.children.findIndex(i=>i===n):this.options.activeIndex;return this.setActive(s,t)}setActive(e,t=1.3){const n=this.object3d.children[e];if(this.object3d.children.forEach(s=>{if(!(n&&n===s)&&s.scale.z!==1){if(s.userData.levTween)return;s.userData.enTween&&(s.userData.enTween.stop(),s.userData.enTween=null);const i=new K.Tween(s.scale).to({z:1},100);s.userData.levTween=i,i.start()}}),n){if(n.userData.enTween)return;n.userData.levTween&&(n.userData.levTween.stop(),n.userData.levTween=null);const s=new K.Tween(n.scale).to({z:t},100);return n.userData.enTween=s,s.start(),n.userData.index}return-1}render(){this.object3d.scale.z=0,new K.Tween(this.object3d.scale).to({z:1},1e3).easing(K.Easing.Sinusoidal.InOut).start()}}class st extends P.BaseObject{constructor(e){super(),this.rectAreaLightUniformsLibInit=!1,this.options=e}create(){var t,n,s,i,a,g,r,u,o,h,w,f,x,C,L,M,E;const e=this.options;if(e.type==="AmbientLight"){const S=new c.AmbientLight(e.color);S.name="环境光",this.object3d=S}else if(e.type==="DirectionalLight"){const S=new c.DirectionalLight(e.color,e.intensity);S.name="平行光",S.target.position.set(0,0,0),this.object3d=S,S.target.name="平行光目标",S.shadow.camera.name="平行光阴影相机",S.shadow.camera.userData.directionalLightShadow=!0,this.directionalLight=S}else if(e.type==="PointLight"){const S=new c.PointLight((t=e.color)!=null?t:16777215,(n=e.intensity)!=null?n:1,(s=e.distance)!=null?s:0,(i=e.decay)!=null?i:2);S.name="点光源",this.object3d=S,this.pointLight=S}else if(e.type==="SpotLight"){const S=new c.SpotLight((a=e.color)!=null?a:16777215,(g=e.intensity)!=null?g:1,(r=e.distance)!=null?r:0,(u=e.angle)!=null?u:Math.PI/3,(o=e.penumbra)!=null?o:1,(h=e.decay)!=null?h:2);S.name="聚光灯",this.object3d=S,this.spotLight=S,S.target.name="聚光灯目标"}else if(e.type==="HemisphereLight"){const S=new c.HemisphereLight((w=e.color)!=null?w:16777215,(f=e.groundColor)!=null?f:16777215,(x=e.intensity)!=null?x:1);S.name="半球光",this.object3d=S,this.hemisphereLight=S}else if(e.type==="RectAreaLight"){this.rectAreaLightUniformsLibInit||(Ye.RectAreaLightUniformsLib.init(),this.rectAreaLightUniformsLibInit=!0);const S=new c.RectAreaLight((C=e.color)!=null?C:16777215,(L=e.intensity)!=null?L:1,(M=e.width)!=null?M:10,(E=e.height)!=null?E:10);S.name="矩形区域光",this.object3d=S,this.rectAreaLight=S}}render(){const e=this.object3d;e.target&&this.pencil.scene.add(e.target);const t=this.pencil.cameraTarget;if(this.spotLight||this.directionalLight){const n=this.spotLight||this.directionalLight;n.position.copy(t),n.target.position.copy(t)}else this.pointLight&&this.pointLight.position.copy(t)}dispose(){const e=this.object3d;e.target&&this.pencil.scene.remove(e.target),super.dispose()}}function R(p,e=0){const t=p[0].index!==null,n=new Set(Object.keys(p[0].attributes)),s=new Set(Object.keys(p[0].morphAttributes)),i={},a={},g=p[0].morphTargetsRelative,r=new c.BufferGeometry;let u=0;for(let o=0;o<p.length;++o){const h=p[o];let w=0;if(t!==(h.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+o+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(const f in h.attributes){if(!n.has(f))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+o+'. All geometries must have compatible attributes; make sure "'+f+'" attribute exists among all geometries, or in none of them.'),null;i[f]===void 0&&(i[f]=[]),i[f].push(h.attributes[f]),w++}if(w!==n.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+o+". Make sure all geometries have the same number of attributes."),null;if(g!==h.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+o+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(const f in h.morphAttributes){if(!s.has(f))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+o+". .morphAttributes must be consistent throughout all geometries."),null;a[f]===void 0&&(a[f]=[]),a[f].push(h.morphAttributes[f])}if(e){let f;if(t)f=h.index.count;else if(h.attributes.position!==void 0)f=h.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+o+". The geometry must have either an index or a position attribute"),null;if(e===1)r.addGroup(u,f,o);else if(e===2&&h.groups.length>0)for(let x of h.groups){let C=x.materialIndex;r.addGroup(u+x.start,Math.min(x.count,f),C)}u+=f}}if(t){let o=0;const h=[];for(let w=0;w<p.length;++w){const f=p[w].index;for(let x=0;x<f.count;++x)h.push(f.getX(x)+o);o+=p[w].attributes.position.count}r.setIndex(h)}for(const o in i){const h=me.mergeAttributes(i[o]);if(!h)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+o+" attribute."),null;r.setAttribute(o,h)}for(const o in a){const h=a[o][0].length;if(h===0)break;r.morphAttributes=r.morphAttributes||{},r.morphAttributes[o]=[];for(let w=0;w<h;++w){const f=[];for(let C=0;C<a[o].length;++C)f.push(a[o][C][w]);const x=me.mergeAttributes(f);if(!x)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+o+" morphAttribute."),null;r.morphAttributes[o].push(x)}}return e===2?me.mergeGroups(r):r}const _e=p=>{const{points:e}=p,t=e.reduce((s,i,a)=>(a<e.length-1&&s.push(i,e[a+1]),s),[]);return new c.BufferGeometry().setFromPoints(t)};let ot=class extends P.BaseObject{constructor(e={}){super(),this.options=B({},e)}get material(){var e;return(e=this.object3d)==null?void 0:e.material}create(){return ne(this,null,function*(){const{points:e,pointsArr:t,geometry:n,geometryArr:s,material:i,useGroups:a,setPointWidth:g,lineWidthArr:r,materialParameters:u,instanceCount:o}=this.options;let h=i,w=n;!h&&u&&(h=this.getMaterial(u)),!w&&e?w=_e({points:e}):!w&&t?w=R(t.map(x=>_e({points:x})),a!=null?a:0):!w&&s&&s.length>1?w=R(s,a!=null?a:0):!w&&s&&s.length===1&&([w]=s);const f=new Oe.LineSegmentsGeometry().fromLineSegments(new c.LineSegments(w));if(this.pencil.options.WebGPUTHREE){o&&(f.instanceCount=o);const x=new P.LineSegments2(f,h);x.computeLineDistances(),this.object3d=x}else{const x=new Ze.LineSegments2(f,h);x.computeLineDistances(),this.object3d=x}})}getMaterial(e){return new Ie.LineMaterial(B({color:new c.Color("#ffffff")},e))}};class Ue extends c.BufferGeometry{constructor(e=[],t="none",n){super(),this.type="MeshLineGeometry",this.pointCount=0,this._points=[],this.shape="none",this.shapeFunction=s=>1,this.matrixWorld=new c.Matrix4,this.shape=t,n&&(this.shapeFunction=n),e.length>0&&this.setPoints(e)}convertToVector3Array(e){if(typeof e[0]=="number"){const t=[],n=e;for(let s=0;s<n.length;s+=3)t.push(new c.Vector3(n[s],n[s+1],n[s+2]));return t}else return e.map(t=>{if(t instanceof c.Vector2)return new c.Vector3(t.x,t.y,0);if(t instanceof c.Vector3)return t;if(Array.isArray(t)&&t.length===2)return new c.Vector3(t[0],t[1],0);if(Array.isArray(t)&&t.length===3)return new c.Vector3(t[0],t[1],t[2])}).filter(Boolean)}setMatrixWorld(e){this.matrixWorld=e}setPoints(e,t){!e||e.length===0||(this._points=this.convertToVector3Array(e),this.pointCount=this._points.length,t&&(this.shapeFunction=t,this.shape="custom"),this.initializeGeometry(),this.updateGeometry())}initializeGeometry(){const e=new c.BufferAttribute(new Float32Array(this.pointCount*6),3),t=new c.BufferAttribute(new Float32Array(this.pointCount*6),3),n=new c.BufferAttribute(new Float32Array(this.pointCount*6),3),s=new c.BufferAttribute(new Float32Array(this.pointCount*2),1),i=new c.BufferAttribute(new Float32Array(this.pointCount*2),1),a=new c.BufferAttribute(new Float32Array(this.pointCount*2),1),g=new c.BufferAttribute(new Float32Array(this.pointCount*4),2),r=new c.BufferAttribute(new Uint16Array(this.pointCount*6),1);this.shape==="taper"&&(this.shapeFunction=u=>1*Math.pow(4*u*(1-u),1));for(let u=0,o=0,h=0;u<this.pointCount;u+=1,o+=2,h+=6){s.setX(o,u/this._points.length),s.setX(o+1,u/this._points.length),i.setX(o,1),i.setX(o+1,-1);const w=this.shape==="none"?1:this.shapeFunction(u/(this.pointCount-1));if(a.setX(o,w),a.setX(o+1,w),g.setXY(o*2,u/(this.pointCount-1),0),g.setXY(o*2+1,u/(this.pointCount-1),1),u<this.pointCount-1){const f=u*2;r.setX(h+0,f+0),r.setX(h+1,f+1),r.setX(h+2,f+2),r.setX(h+3,f+2),r.setX(h+4,f+1),r.setX(h+5,f+3)}}this.setAttribute("position",e),this.setAttribute("previous",t),this.setAttribute("next",n),this.setAttribute("counters",s),this.setAttribute("side",i),this.setAttribute("width",a),this.setAttribute("uv",g),this.setIndex(r)}updateGeometry(){if(!this._points[0])return;const e=this.getAttribute("position"),t=this.getAttribute("previous"),n=this.getAttribute("next");let s=0,i=0,a=0;const g=this._points[0];t.setXYZ(i,g.x,g.y,g.z),i+=1,t.setXYZ(i,g.x,g.y,g.z),i+=1;for(let u=0;u<this.pointCount;u++){const o=this._points[u];e.setXYZ(s,o.x,o.y,o.z),s+=1,e.setXYZ(s,o.x,o.y,o.z),s+=1,u<this.pointCount-1&&(t.setXYZ(i,o.x,o.y,o.z),i+=1,t.setXYZ(i,o.x,o.y,o.z),i+=1),u>0&&u+1<=this.pointCount&&(n.setXYZ(a,o.x,o.y,o.z),a+=1,n.setXYZ(a,o.x,o.y,o.z),a+=1)}const r=this._points[this.pointCount-1];n.setXYZ(a,r.x,r.y,r.z),a+=1,n.setXYZ(a,r.x,r.y,r.z),a+=1,e.needsUpdate=!0,t.needsUpdate=!0,n.needsUpdate=!0,this.computeBoundingSphere()}get points(){return this._points}set points(e){this.setPoints(e)}updatePoints(e,t){const n=this.convertToVector3Array(e);if(n.length!==this.pointCount){console.warn("MeshLineGeometry: Cannot update points with different length. Use setPoints() instead.");return}this._points=n,t&&(this.shapeFunction=t,this.shape="custom",this.initializeGeometry()),this.updateGeometry()}setShape(e,t){this.shape=e,t&&(this.shapeFunction=t),this._points.length>0&&(this.initializeGeometry(),this.updateGeometry())}}const pe=p=>{const{setPointWidth:e,nodes:t}=p,n=new Ue;return n.setPoints(t,e),n};class it extends P.BaseObject{constructor(e={}){super(),this.options=B({},e)}get material(){var e;return(e=this.object3d)==null?void 0:e.material}create(){return ne(this,null,function*(){const{nodes:e,nodesArr:t,geometry:n,geometryArr:s,material:i,useGroups:a,setPointWidth:g,lineWidthArr:r,materialParameters:u}=this.options;let o=i,h=n;!o&&u&&(o=this.getMaterial(u)),!h&&e?h=pe({nodes:e,setPointWidth:g}):!h&&t?h=R(t.map((w,f)=>{let x=g;return!x&&r&&(x=()=>{var C;return(C=r[f])!=null?C:r[0]}),pe({nodes:w,setPointWidth:x})}),a!=null?a:0):!h&&s&&s.length>1?h=R(s,a!=null?a:0):!h&&s&&s.length===1&&([h]=s),this.createMesh(h,o)})}setGeometry(e,t){const n=pe({nodes:e,setPointWidth:t}),s=this.object3d,i=s.geometry;s.geometry=n,i.dispose()}getMaterial(e){const{width:t,height:n}=this.pencil.getSize(),s=new P.MeshLineMaterial(B({color:new c.Color("#ffffff")},e));return s.uniforms.resolution.value.set(t,n),s}addGeometries(e){const t=this.object3d,n=R([t.geometry,...e]);t.geometry=n}resize(e,t){var n,s;(s=(n=this.material)==null?void 0:n.uniforms)==null||s.resolution.value.set(e,t)}handleMaterialChange(e){if(e){const{width:t,height:n}=this.pencil.getSize();this.resize(t,n)}}animate({duration:e=1e3,delay:t=0,repeat:n=0,lineLoop:s,onRepeat:i,onUpdate:a,onComplete:g,startShow:r}={}){const{offset:u,offsetLoop:o}=this.material.uniforms;if(this.material.userData.tween)return;const h=s!=null?s:!0;u.value.x=1,o.value=h&&r?1:0;let w=0;const f=new K.Tween(u.value).to({x:-1},e).delay(t).repeat(n).onUpdate(({x})=>{h&&x<=0&&o.value===0&&(o.value=1),a&&a(x)}).onRepeat(()=>{w+=1,i&&i(w)}).onComplete(()=>{g&&g()}).start();this.material.userData.tween=f}render(){const{width:e,height:t}=this.pencil.getSize();this.resize(e,t)}dispose(){this.material.userData.tween&&(this.material.userData.tween.stop(),K.remove(this.material.userData.tween)),super.dispose()}}const Ve=p=>{const g=p,{coordinate:e,startHeight:t,height:n}=g,s=de(g,["coordinate","startHeight","height"]);let i=t||0;return typeof t!="undefined"&&typeof n!="undefined"&&(i=t+n),new P.PolygonGeometry([e],ce(B({},s),{startHeight:t,endHeight:i}))};class rt extends P.BaseObject{constructor(e){super(),this.options=B({},e)}create(){const r=this.options,{geometry:e,coordinateArr:t,coordinate:n,material:s,useGroups:i}=r,a=de(r,["geometry","coordinateArr","coordinate","material","useGroups"]);let g=e;if(!g&&n)g=Ve(B({coordinate:n},a));else if(!g&&t){const u=t.map(o=>Ve(B({coordinate:o},a)));g=R(u,i!=null?i:0)}this.createMesh(g,s)}}class at extends ${constructor(e,t){super(e,t);const n=new le.Brush(new $(e,ce(B({},t),{hasTop:!0,hasSide:!0,hasBottom:!1})));n.updateMatrixWorld();const s=new c.Box3().setFromObject(n),i=new c.Vector3;s.getSize(i);const a=new c.Vector3(s.min.x+i.x/2,s.min.y+i.y/2,0);let g=t.topSegments,r=t.box3;if(r){r=r.union(s);const M=new c.Vector3;r.getSize(M);const E=Math.max(i.x/M.x,i.y/M.y);g=Math.ceil(t.topSegments*E)}if(g<4)return this;const u=new c.PlaneGeometry(i.x,i.y,g,g),o=new le.Brush(u);o.position.set(a.x,a.y,a.z),o.updateMatrixWorld();const w=new le.Evaluator().evaluate(o,n,le.INTERSECTION),f=w.geometry.getAttribute("position"),x=new c.Float32BufferAttribute(f.count*2,2);for(let M=0;M<f.count;M++){const E=f.getZ(M);f.setZ(M,t.depth+E)}if(r){const M=r.min,E=r.max,S=new c.Vector3().subVectors(E,M);for(let I=0;I<f.count;I++){const he=f.getX(I),k=f.getY(I),J=(he-M.x)/S.x,F=(k-M.y)/S.y;x.setXY(I,J,F)}w.geometry.setAttribute("uv",x)}f.needsUpdate=!0;const C=new $(e,ce(B({},t),{hasTop:!1})),L=R([w.geometry,C],2);this.copy(L.toNonIndexed())}}const ze=p=>{const{split:e,depth:t,points:n,box3:s,hasTop:i,hasBottom:a,hasSide:g,sideRepeat:r,topSegments:u}=p,o=u?at:$,h=new o(new c.Shape(n),{depth:t,bevelEnabled:!1,box3:s,UVGenerator:Pe.getUVGenerator({split:e,box3:s,sideRepeat:r}),hasTop:i,hasBottom:a,hasSide:g,topSegments:u});return Pe.claerUVGenerator(),h};class ct extends P.BaseObject{constructor(e){super(),this.options=B({depth:1},e)}create(){return ne(this,null,function*(){const{points:e,pointsArr:t,useGroups:n,depth:s,geometry:i,geometryArr:a,material:g,box3:r,split:u,hasTop:o,hasBottom:h,hasSide:w}=this.options,f=Array.isArray(s)?s:[s],x=Array.isArray(r)?r:[r],C=g;let L=i;C||console.log("material is null"),!L&&e?L=ze({points:e,depth:f[0],box3:x[0],split:u,hasTop:o,hasBottom:h,hasSide:w}):!L&&t?L=R(t.map((M,E)=>{var S,I;return ze({points:M,depth:(S=f[E])!=null?S:f[0],box3:(I=x[E])!=null?I:x[0],split:u,hasTop:o,hasBottom:h,hasSide:w})}),n!=null?n:0):!L&&a&&a.length>1?L=R(a,n!=null?n:0):!L&&a&&a.length===1&&([L]=a),this.createMesh(L,C)})}addGeometries(e){const t=this.object3d,n=R([t.geometry,...e]);t.geometry=n}setTextureAnisotropic(e,t){e.anisotropy=t||this.pencil.renderer.capabilities.getMaxAnisotropy()}}const lt=p=>{const{topColor:e,sideColor:t,sideMap:n,createCanvasObjectURL:s,split:i,maxAnisotropy:a}=p;return new Promise(g=>{const r=n?document.createElement("img"):{src:"",onload:()=>{},width:128,height:128};r.onload=()=>{const u=i,o=document.createElement("canvas"),h=o.getContext("2d");o.height=r.height/(1-u),o.width=r.width,u&&e&&(h.fillStyle=e,h.fillRect(0,0,r.width,o.height*u)),n&&r instanceof HTMLImageElement?h.drawImage(r,0,o.height*u,r.width,r.height):t&&(h.fillStyle=t,h.fillRect(0,o.height*u,r.width,r.height)),s&&o.toBlob(f=>{console.log(URL.createObjectURL(f))});const w=new c.CanvasTexture(o);g(w)},n?r.src=n:r instanceof HTMLImageElement||r.onload()})};exports.MeshLineMaterial=P.MeshLineMaterial;exports.getConicPolygonGeometry=P.PolygonGeometry;exports.getConicPolygonGeometryMetas=P.getMetas;Object.defineProperty(exports,"LineSegmentsGeometry",{enumerable:!0,get:()=>Oe.LineSegmentsGeometry});Object.defineProperty(exports,"Line2Material",{enumerable:!0,get:()=>Ie.LineMaterial});exports.ConicPolygon=rt;exports.ExtrudePolygon=ct;exports.Group=Qe;exports.Light=st;exports.Line=it;exports.Line2=ot;exports.MeshLineGeometry=Ue;exports.Node=Je;exports.Pie=nt;exports.getSplitTexture=lt;
|
|
1
|
+
"use strict";var We=Object.defineProperty,qe=Object.defineProperties;var ke=Object.getOwnPropertyDescriptors;var ce=Object.getOwnPropertySymbols;var Be=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;var je=(u,e,t)=>e in u?We(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,E=(u,e)=>{for(var t in e||(e={}))Be.call(e,t)&&je(u,t,e[t]);if(ce)for(var t of ce(e))Ee.call(e,t)&&je(u,t,e[t]);return u},le=(u,e)=>qe(u,ke(e));var de=(u,e)=>{var t={};for(var n in u)Be.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&ce)for(var n of ce(u))e.indexOf(n)<0&&Ee.call(u,n)&&(t[n]=u[n]);return t};var se=(u,e,t)=>new Promise((n,s)=>{var i=r=>{try{m(t.next(r))}catch(f){s(f)}},a=r=>{try{m(t.throw(r))}catch(f){s(f)}},m=r=>r.done?n(r.value):Promise.resolve(r.value).then(i,a);m((t=t.apply(u,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("../index2.js"),c=require("three"),Fe=require("@tweenjs/tween.js"),Ye=require("three/examples/jsm/lights/RectAreaLightUniformsLib"),pe=require("three/examples/jsm/utils/BufferGeometryUtils"),Ze=require("three/examples/jsm/lines/LineSegments2"),Oe=require("three/examples/jsm/lines/LineSegmentsGeometry"),Ie=require("three/examples/jsm/lines/LineMaterial"),Ve=require("../uvGenerator.js"),he=require("three-bvh-csg");function $e(u){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(u){for(const t in u)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(u,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>u[t]})}}return e.default=u,Object.freeze(e)}const ee=$e(Fe);class Je extends V.BaseObject{constructor(e){super(),this.objectType="BaseObject#Node",this.onNodePointerIndex=[],this.options=E({type:"2d"},e)}create(){const{position:e,children:t}=this.options,n=document.createElement("div");this.element=n,t&&n.appendChild(t),this.options.type==="3d"?this.createCSS3DObject(n):this.options.type==="3dSprite"?this.createCSS3DSprite(n):this.createCSS2DObject(n),e&&this.object3d.position.copy(e)}setChildren(e){this.options.children=e,this.element.innerHTML="",this.element.appendChild(e)}showAndEnsureVisible(){const e=this.options.children;e&&(e.style.visibility="hidden",this.show(),setTimeout(()=>{e.style.visibility="",this.ensureVisible()}))}moveElementToViewport(){const e=this.options.children;if(!e)return;const t=e.getBoundingClientRect(),n=window.innerWidth,s=window.innerHeight;let i=0,a=0;t.left<0?i=-t.left:t.right>n&&(i=n-t.right),t.top<0?a=-t.top:t.bottom>s&&(a=s-t.bottom),t.left+i<0&&(i=-t.left),t.top+a<0&&(a=-t.top),(i!==0||a!==0)&&(e.style.transform=`translate(${i}px, ${a}px)`)}ensureVisible(){const e=this.options.children;if(!e)return;e.style.transform&&(e.style.transform="");const t=new IntersectionObserver(n=>{n.forEach(s=>{s.isIntersecting&&(this.moveElementToViewport(),t.disconnect())})});t.observe(e)}onPointerEvent(e,t){const n=this.lead.handlePickNode([this],e,t);this.onNodePointerIndex.push(n)}dispose(){this.onNodePointerIndex.forEach(e=>{this.lead.removePickNode(e)}),super.dispose()}}class Qe extends V.BaseObject{create(){this.createGroup()}}const Ke={ArcCurve:c.ArcCurve,CatmullRomCurve3:c.CatmullRomCurve3,CubicBezierCurve:c.CubicBezierCurve,CubicBezierCurve3:c.CubicBezierCurve3,EllipseCurve:c.EllipseCurve,LineCurve:c.LineCurve,LineCurve3:c.LineCurve3,QuadraticBezierCurve:c.QuadraticBezierCurve,QuadraticBezierCurve3:c.QuadraticBezierCurve3,SplineCurve:c.SplineCurve};class J extends c.BufferGeometry{constructor(e=new c.Shape([new c.Vector2(.5,.5),new c.Vector2(-.5,.5),new c.Vector2(-.5,-.5),new c.Vector2(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,s=[],i=[];for(let m=0,r=e.length;m<r;m++){const f=e[m];a(f)}this.setAttribute("position",new c.Float32BufferAttribute(s,3)),this.setAttribute("uv",new c.Float32BufferAttribute(i,2)),this.computeVertexNormals();function a(m){var ve,Se,Ae;const r=[],f=t.curveSegments!==void 0?t.curveSegments:12,o=t.steps!==void 0?t.steps:1,l=t.depth!==void 0?t.depth:1;let b=t.bevelEnabled!==void 0?t.bevelEnabled:!0,d=t.bevelThickness!==void 0?t.bevelThickness:.2,y=t.bevelSize!==void 0?t.bevelSize:d-.1,C=t.bevelOffset!==void 0?t.bevelOffset:0,A=t.bevelSegments!==void 0?t.bevelSegments:3;const M=t.extrudePath,B=t.UVGenerator!==void 0?t.UVGenerator:et,S=(ve=t.hasTop)!=null?ve:!0,P=(Se=t.hasBottom)!=null?Se:!0,Q=(Ae=t.hasSide)!=null?Ae:!0;let H,Y=!1,U,te,ne,N;M&&(H=M.getSpacedPoints(o),Y=!0,b=!1,U=M.computeFrenetFrames(o,!1),te=new c.Vector3,ne=new c.Vector3,N=new c.Vector3),b||(A=0,d=0,y=0,C=0);const ge=m.extractPoints(f);let I=ge.shape;const _=ge.holes;if(!c.ShapeUtils.isClockWise(I)){I=I.reverse();for(let h=0,p=_.length;h<p;h++){const g=_[h];c.ShapeUtils.isClockWise(g)&&(_[h]=g.reverse())}}function ye(h){const g=10000000000000001e-36;let w=h[0];for(let x=1;x<=h.length;x++){const L=x%h.length,v=h[L],T=v.x-w.x,G=v.y-w.y,j=T*T+G*G,z=Math.max(Math.abs(v.x),Math.abs(v.y),Math.abs(w.x),Math.abs(w.y)),$=g*z*z;if(j<=$){h.splice(L,1),x--;continue}w=v}}ye(I),_.forEach(ye);const ue=_.length,R=I;for(let h=0;h<ue;h++){const p=_[h];I=I.concat(p)}function K(h,p,g){return p||console.error("THREE.ExtrudeGeometry: vec does not exist"),h.clone().addScaledVector(p,g)}const X=I.length;function be(h,p,g){let w,x,L;const v=h.x-p.x,T=h.y-p.y,G=g.x-h.x,j=g.y-h.y,z=v*v+T*T,$=v*j-T*G;if(Math.abs($)>Number.EPSILON){const O=Math.sqrt(z),Me=Math.sqrt(G*G+j*j),Le=p.x-T/O,Ce=p.y+v/O,Ne=g.x-j/Me,Xe=g.y+G/Me,Te=((Ne-Le)*j-(Xe-Ce)*G)/(v*j-T*G);w=Le+v*Te-h.x,x=Ce+T*Te-h.y;const Ge=w*w+x*x;if(Ge<=2)return new c.Vector2(w,x);L=Math.sqrt(Ge/2)}else{let O=!1;v>Number.EPSILON?G>Number.EPSILON&&(O=!0):v<-Number.EPSILON?G<-Number.EPSILON&&(O=!0):Math.sign(T)===Math.sign(j)&&(O=!0),O?(w=-T,x=v,L=Math.sqrt(z)):(w=v,x=T,L=Math.sqrt(z/2))}return new c.Vector2(w/L,x/L)}const oe=[];for(let h=0,p=R.length,g=p-1,w=h+1;h<p;h++,g++,w++)g===p&&(g=0),w===p&&(w=0),oe[h]=be(R[h],R[g],R[w]);const fe=[];let F,ie=oe.concat();for(let h=0,p=ue;h<p;h++){const g=_[h];F=[];for(let w=0,x=g.length,L=x-1,v=w+1;w<x;w++,L++,v++)L===x&&(L=0),v===x&&(v=0),F[w]=be(g[w],g[L],g[v]);fe.push(F),ie=ie.concat(F)}let Z;if(A===0)Z=c.ShapeUtils.triangulateShape(R,_);else{const h=[],p=[];for(let g=0;g<A;g++){const w=g/A,x=d*Math.cos(w*Math.PI/2),L=y*Math.sin(w*Math.PI/2)+C;for(let v=0,T=R.length;v<T;v++){const G=K(R[v],oe[v],L);W(G.x,G.y,-x),w===0&&h.push(G)}for(let v=0,T=ue;v<T;v++){const G=_[v];F=fe[v];const j=[];for(let z=0,$=G.length;z<$;z++){const O=K(G[z],F[z],L);W(O.x,O.y,-x),w===0&&j.push(O)}w===0&&p.push(j)}}Z=c.ShapeUtils.triangulateShape(h,p)}const re=Z.length,xe=y+C;for(let h=0;h<X;h++){const p=b?K(I[h],ie[h],xe):I[h];Y?(ne.copy(U.normals[0]).multiplyScalar(p.x),te.copy(U.binormals[0]).multiplyScalar(p.y),N.copy(H[0]).add(ne).add(te),W(N.x,N.y,N.z)):W(p.x,p.y,0)}for(let h=1;h<=o;h++)for(let p=0;p<X;p++){const g=b?K(I[p],ie[p],xe):I[p];Y?(ne.copy(U.normals[h]).multiplyScalar(g.x),te.copy(U.binormals[h]).multiplyScalar(g.y),N.copy(H[h]).add(ne).add(te),W(N.x,N.y,N.z)):W(g.x,g.y,l/o*h)}for(let h=A-1;h>=0;h--){const p=h/A,g=d*Math.cos(p*Math.PI/2),w=y*Math.sin(p*Math.PI/2)+C;for(let x=0,L=R.length;x<L;x++){const v=K(R[x],oe[x],w);W(v.x,v.y,l+g)}for(let x=0,L=_.length;x<L;x++){const v=_[x];F=fe[x];for(let T=0,G=v.length;T<G;T++){const j=K(v[T],F[T],w);Y?W(j.x,j.y+H[o-1].y,H[o-1].x+g):W(j.x,j.y,l+g)}}}Re(),Q&&De();function Re(){const h=s.length/3;if(b){let p=0,g=X*p;if(P)for(let w=0;w<re;w++){const x=Z[w];ae(x[2]+g,x[1]+g,x[0]+g)}if(p=o+A*2,g=X*p,S)for(let w=0;w<re;w++){const x=Z[w];ae(x[0]+g,x[1]+g,x[2]+g)}}else{if(P)for(let p=0;p<re;p++){const g=Z[p];ae(g[2],g[1],g[0])}if(S)for(let p=0;p<re;p++){const g=Z[p];ae(g[0]+X*o,g[1]+X*o,g[2]+X*o)}}n.addGroup(h,s.length/3-h,0)}function De(){const h=s.length/3;let p=0;we(R,p),p+=R.length;for(let g=0,w=_.length;g<w;g++){const x=_[g];we(x,p),p+=x.length}n.addGroup(h,s.length/3-h,1)}function we(h,p){let g=h.length;for(;--g>=0;){const w=g;let x=g-1;x<0&&(x=h.length-1);for(let L=0,v=o+A*2;L<v;L++){const T=X*L,G=X*(L+1),j=p+w+T,z=p+x+T,$=p+x+G,O=p+w+G;He(j,z,$,O)}}}function W(h,p,g){r.push(h),r.push(p),r.push(g)}function ae(h,p,g){q(h),q(p),q(g);const w=s.length/3,x=B.generateTopUV(n,s,w-3,w-2,w-1);k(x[0]),k(x[1]),k(x[2])}function He(h,p,g,w){q(h),q(p),q(w),q(p),q(g),q(w);const x=s.length/3,L=B.generateSideWallUV(n,s,x-6,x-3,x-2,x-1);k(L[0]),k(L[1]),k(L[3]),k(L[1]),k(L[2]),k(L[3])}function q(h){s.push(r[h*3+0]),s.push(r[h*3+1]),s.push(r[h*3+2])}function k(h){i.push(h.x),i.push(h.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes,n=this.parameters.options;return tt(t,n,e)}static fromJSON(e,t){const n=[];for(let i=0,a=e.shapes.length;i<a;i++){const m=t[e.shapes[i]];n.push(m)}const s=e.options.extrudePath;return s!==void 0&&(e.options.extrudePath=new Ke[`${s.type}`]().fromJSON(s)),new J(n,e.options)}}const et={generateTopUV:function(u,e,t,n,s){const i=e[t*3],a=e[t*3+1],m=e[n*3],r=e[n*3+1],f=e[s*3],o=e[s*3+1];return[new c.Vector2(i,a),new c.Vector2(m,r),new c.Vector2(f,o)]},generateSideWallUV:function(u,e,t,n,s,i){const a=e[t*3],m=e[t*3+1],r=e[t*3+2],f=e[n*3],o=e[n*3+1],l=e[n*3+2],b=e[s*3],d=e[s*3+1],y=e[s*3+2],C=e[i*3],A=e[i*3+1],M=e[i*3+2];return Math.abs(m-o)<Math.abs(a-f)?[new c.Vector2(a,1-r),new c.Vector2(f,1-l),new c.Vector2(b,1-y),new c.Vector2(C,1-M)]:[new c.Vector2(m,1-r),new c.Vector2(o,1-l),new c.Vector2(d,1-y),new c.Vector2(A,1-M)]}};function tt(u,e,t){if(t.shapes=[],Array.isArray(u))for(let n=0,s=u.length;n<s;n++){const i=u[n];t.shapes.push(i.uuid)}else t.shapes.push(u.uuid);return t.options=Object.assign({},e),e.extrudePath!==void 0&&(t.options.extrudePath=e.extrudePath.toJSON()),t}class nt extends V.BaseObject{constructor(e){super(),this.options=E({maxDepth:10,percentDepth:!1,innerRadius:25,outRadius:42,activeIndex:-1},e)}create(){return se(this,null,function*(){this.createGroup();const{data:e,maxDepth:t,colors:n,material:s,percentDepth:i,activeIndex:a}=this.options,m=Math.max(...e),r=e.reduce((o,l)=>o+l,0);let f=Math.PI/2;e.forEach((o,l)=>{if(o===0)return;const b=Math.PI*2*(o/r),d=n[l],y=i?t*(o/m):t,C=this.createGeometry(y,b),A=s?s.clone():new c.MeshBasicMaterial({color:d});s&&A.color.set(d);const M=new c.Mesh(C,A);M.userData.depth=y,M.userData.index=l,M.rotateZ(f),f+=b,this.add(M)}),a!==-1&&this.setActive(a)})}createGeometry(e,t){const{outRadius:n,innerRadius:s}=this.options,i=new c.Shape;return i.moveTo(n,0),i.lineTo(s,0),i.absarc(0,0,s,0,t,!1),i.absarc(0,0,n,t,0,!0),new J(i,{curveSegments:48,depth:e,bevelEnabled:!1})}handlePick(e,t=1.3){const{object:n}=this.pencil.pick(e,this.object3d.children)||{},s=n?this.object3d.children.findIndex(i=>i===n):this.options.activeIndex;return this.setActive(s,t)}setActive(e,t=1.3){const n=this.object3d.children[e];if(this.object3d.children.forEach(s=>{if(!(n&&n===s)&&s.scale.z!==1){if(s.userData.levTween)return;s.userData.enTween&&(s.userData.enTween.stop(),s.userData.enTween=null);const i=new ee.Tween(s.scale).to({z:1},100);s.userData.levTween=i,i.start()}}),n){if(n.userData.enTween)return;n.userData.levTween&&(n.userData.levTween.stop(),n.userData.levTween=null);const s=new ee.Tween(n.scale).to({z:t},100);return n.userData.enTween=s,s.start(),n.userData.index}return-1}render(){this.object3d.scale.z=0,new ee.Tween(this.object3d.scale).to({z:1},1e3).easing(ee.Easing.Sinusoidal.InOut).start()}}class st extends V.BaseObject{constructor(e){super(),this.rectAreaLightUniformsLibInit=!1,this.options=e}create(){var t,n,s,i,a,m,r,f,o,l,b,d,y,C,A,M,B;const e=this.options;if(e.type==="AmbientLight"){const S=new c.AmbientLight(e.color);S.name="环境光",this.object3d=S}else if(e.type==="DirectionalLight"){const S=new c.DirectionalLight(e.color,e.intensity);S.name="平行光",S.target.position.set(0,0,0),this.object3d=S,S.target.name="平行光目标",S.shadow.camera.name="平行光阴影相机",S.shadow.camera.userData.directionalLightShadow=!0,this.directionalLight=S}else if(e.type==="PointLight"){const S=new c.PointLight((t=e.color)!=null?t:16777215,(n=e.intensity)!=null?n:1,(s=e.distance)!=null?s:0,(i=e.decay)!=null?i:2);S.name="点光源",this.object3d=S,this.pointLight=S}else if(e.type==="SpotLight"){const S=new c.SpotLight((a=e.color)!=null?a:16777215,(m=e.intensity)!=null?m:1,(r=e.distance)!=null?r:0,(f=e.angle)!=null?f:Math.PI/3,(o=e.penumbra)!=null?o:1,(l=e.decay)!=null?l:2);S.name="聚光灯",this.object3d=S,this.spotLight=S,S.target.name="聚光灯目标"}else if(e.type==="HemisphereLight"){const S=new c.HemisphereLight((b=e.color)!=null?b:16777215,(d=e.groundColor)!=null?d:16777215,(y=e.intensity)!=null?y:1);S.name="半球光",this.object3d=S,this.hemisphereLight=S}else if(e.type==="RectAreaLight"){this.rectAreaLightUniformsLibInit||(Ye.RectAreaLightUniformsLib.init(),this.rectAreaLightUniformsLibInit=!0);const S=new c.RectAreaLight((C=e.color)!=null?C:16777215,(A=e.intensity)!=null?A:1,(M=e.width)!=null?M:10,(B=e.height)!=null?B:10);S.name="矩形区域光",this.object3d=S,this.rectAreaLight=S}}render(){const e=this.object3d;e.target&&this.pencil.scene.add(e.target);const t=this.pencil.cameraTarget;if(this.spotLight||this.directionalLight){const n=this.spotLight||this.directionalLight;n.position.copy(t),n.target.position.copy(t)}else this.pointLight&&this.pointLight.position.copy(t)}dispose(){const e=this.object3d;e.target&&this.pencil.scene.remove(e.target),super.dispose()}}function D(u,e=0){const t=u[0].index!==null,n=new Set(Object.keys(u[0].attributes)),s=new Set(Object.keys(u[0].morphAttributes)),i={},a={},m=u[0].morphTargetsRelative,r=new c.BufferGeometry;let f=0;for(let o=0;o<u.length;++o){const l=u[o];let b=0;if(t!==(l.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+o+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(const d in l.attributes){if(!n.has(d))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+o+'. All geometries must have compatible attributes; make sure "'+d+'" attribute exists among all geometries, or in none of them.'),null;i[d]===void 0&&(i[d]=[]),i[d].push(l.attributes[d]),b++}if(b!==n.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+o+". Make sure all geometries have the same number of attributes."),null;if(m!==l.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+o+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(const d in l.morphAttributes){if(!s.has(d))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+o+". .morphAttributes must be consistent throughout all geometries."),null;a[d]===void 0&&(a[d]=[]),a[d].push(l.morphAttributes[d])}if(e){let d;if(t)d=l.index.count;else if(l.attributes.position!==void 0)d=l.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+o+". The geometry must have either an index or a position attribute"),null;if(e===1)r.addGroup(f,d,o);else if(e===2&&l.groups.length>0)for(let y of l.groups){let C=y.materialIndex;r.addGroup(f+y.start,Math.min(y.count,d),C)}f+=d}}if(t){let o=0;const l=[];for(let b=0;b<u.length;++b){const d=u[b].index;for(let y=0;y<d.count;++y)l.push(d.getX(y)+o);o+=u[b].attributes.position.count}r.setIndex(l)}for(const o in i){const l=pe.mergeAttributes(i[o]);if(!l)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+o+" attribute."),null;r.setAttribute(o,l)}for(const o in a){const l=a[o][0].length;if(l===0)break;r.morphAttributes=r.morphAttributes||{},r.morphAttributes[o]=[];for(let b=0;b<l;++b){const d=[];for(let C=0;C<a[o].length;++C)d.push(a[o][C][b]);const y=pe.mergeAttributes(d);if(!y)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+o+" morphAttribute."),null;r.morphAttributes[o].push(y)}}return e===2?pe.mergeGroups(r):r}const Pe=u=>{const{points:e}=u,t=e.reduce((s,i,a)=>(a<e.length-1&&s.push(i,e[a+1]),s),[]);return new c.BufferGeometry().setFromPoints(t)};let ot=class extends V.BaseObject{constructor(e={}){super(),this.options=E({},e)}get material(){var e;return(e=this.object3d)==null?void 0:e.material}create(){return se(this,null,function*(){const{points:e,pointsArr:t,geometry:n,geometryArr:s,material:i,useGroups:a,setPointWidth:m,lineWidthArr:r,materialParameters:f,instanceCount:o}=this.options;let l=i,b=n;!l&&f&&(l=this.getMaterial(f)),!b&&e?b=Pe({points:e}):!b&&t?b=D(t.map(y=>Pe({points:y})),a!=null?a:0):!b&&s&&s.length>1?b=D(s,a!=null?a:0):!b&&s&&s.length===1&&([b]=s);const d=new Oe.LineSegmentsGeometry().fromLineSegments(new c.LineSegments(b));if(this.pencil.options.WebGPUTHREE){o&&(d.instanceCount=o);const y=new V.LineSegments2(d,l);y.computeLineDistances(),this.object3d=y}else{const y=new Ze.LineSegments2(d,l);y.computeLineDistances(),this.object3d=y}})}getMaterial(e){return new Ie.LineMaterial(E({color:new c.Color("#ffffff")},e))}};class Ue extends c.BufferGeometry{constructor(e=[],t="none",n){super(),this.type="MeshLineGeometry",this.pointCount=0,this._points=[],this.shape="none",this.shapeFunction=s=>1,this.matrixWorld=new c.Matrix4,this.shape=t,n&&(this.shapeFunction=n),e.length>0&&this.setPoints(e)}convertToVector3Array(e){if(typeof e[0]=="number"){const t=[],n=e;for(let s=0;s<n.length;s+=3)t.push(new c.Vector3(n[s],n[s+1],n[s+2]));return t}else return e.map(t=>{if(t instanceof c.Vector2)return new c.Vector3(t.x,t.y,0);if(t instanceof c.Vector3)return t;if(Array.isArray(t)&&t.length===2)return new c.Vector3(t[0],t[1],0);if(Array.isArray(t)&&t.length===3)return new c.Vector3(t[0],t[1],t[2])}).filter(Boolean)}setMatrixWorld(e){this.matrixWorld=e}setPoints(e,t){!e||e.length===0||(this._points=this.convertToVector3Array(e),this.pointCount=this._points.length,t&&(this.shapeFunction=t,this.shape="custom"),this.initializeGeometry(),this.updateGeometry())}initializeGeometry(){const e=new c.BufferAttribute(new Float32Array(this.pointCount*6),3),t=new c.BufferAttribute(new Float32Array(this.pointCount*6),3),n=new c.BufferAttribute(new Float32Array(this.pointCount*6),3),s=new c.BufferAttribute(new Float32Array(this.pointCount*2),1),i=new c.BufferAttribute(new Float32Array(this.pointCount*2),1),a=new c.BufferAttribute(new Float32Array(this.pointCount*2),1),m=new c.BufferAttribute(new Float32Array(this.pointCount*4),2),r=new c.BufferAttribute(new Uint16Array((this.pointCount-1)*6),1);this.shape==="taper"&&(this.shapeFunction=f=>1*Math.pow(4*f*(1-f),1));for(let f=0,o=0,l=0;f<this.pointCount;f+=1,o+=2,l+=6){s.setX(o,f/this.pointCount),s.setX(o+1,f/this.pointCount),i.setX(o,1),i.setX(o+1,-1);const b=this.shape==="none"?1:this.shapeFunction(f/(this.pointCount-1));a.setX(o,b),a.setX(o+1,b);const d=f/(this.pointCount-1);if(m.setXY(o,d,0),m.setXY(o+1,d,1),f<this.pointCount-1){const y=f*2;r.setX(l+0,y+0),r.setX(l+1,y+1),r.setX(l+2,y+2),r.setX(l+3,y+2),r.setX(l+4,y+1),r.setX(l+5,y+3)}}this.setAttribute("position",e),this.setAttribute("previous",t),this.setAttribute("next",n),this.setAttribute("counters",s),this.setAttribute("side",i),this.setAttribute("width",a),this.setAttribute("uv",m),this.setIndex(r)}updateGeometry(){if(!this._points[0])return;const e=this.getAttribute("position"),t=this.getAttribute("previous"),n=this.getAttribute("next");let s=0,i=0,a=0;const m=this._points[0];t.setXYZ(i,m.x,m.y,m.z),i+=1,t.setXYZ(i,m.x,m.y,m.z),i+=1;for(let f=0;f<this.pointCount;f++){const o=this._points[f];e.setXYZ(s,o.x,o.y,o.z),s+=1,e.setXYZ(s,o.x,o.y,o.z),s+=1,f<this.pointCount-1&&(t.setXYZ(i,o.x,o.y,o.z),i+=1,t.setXYZ(i,o.x,o.y,o.z),i+=1),f>0&&f+1<=this.pointCount&&(n.setXYZ(a,o.x,o.y,o.z),a+=1,n.setXYZ(a,o.x,o.y,o.z),a+=1)}const r=this._points[this.pointCount-1];n.setXYZ(a,r.x,r.y,r.z),a+=1,n.setXYZ(a,r.x,r.y,r.z),a+=1,e.needsUpdate=!0,t.needsUpdate=!0,n.needsUpdate=!0,this.computeBoundingSphere(),this.computeBoundingBox()}get points(){return this._points}set points(e){this.setPoints(e)}updatePoints(e,t){const n=this.convertToVector3Array(e);if(n.length!==this.pointCount){console.warn("MeshLineGeometry: Cannot update points with different length. Use setPoints() instead.");return}this._points=n,t&&(this.shapeFunction=t,this.shape="custom",this.initializeGeometry()),this.updateGeometry()}setShape(e,t){this.shape=e,t&&(this.shapeFunction=t),this._points.length>0&&(this.initializeGeometry(),this.updateGeometry())}}function it(u,e){const t=new c.Matrix4,n=new c.Ray,s=new c.Sphere,i=new c.Vector3,a=this.geometry;if(s.copy(a.boundingSphere),s.applyMatrix4(this.matrixWorld),!u.ray.intersectSphere(s,i))return;t.copy(this.matrixWorld).invert(),n.copy(u.ray).applyMatrix4(t);const m=new c.Vector3,r=new c.Vector3,f=new c.Vector3,o=this instanceof c.LineSegments?2:1,l=a.index,b=a.attributes;if(l!==null){const d=l.array,y=b.position.array,C=b.width.array;for(let A=0,M=d.length-1;A<M;A+=o){const B=d[A],S=d[A+1];m.fromArray(y,B*3),r.fromArray(y,S*3);const P=C[Math.floor(A/3)]!==void 0?C[Math.floor(A/3)]:1,Q=u.params.Line.threshold+this.material.lineWidth*P/2,H=Q*Q;if(n.distanceSqToSegment(m,r,i,f)>H)continue;i.applyMatrix4(this.matrixWorld);const U=u.ray.origin.distanceTo(i);U<u.near||U>u.far||(e.push({distance:U,point:f.clone().applyMatrix4(this.matrixWorld),index:A,face:null,faceIndex:void 0,object:this}),A=M)}}}const me=u=>{const{setPointWidth:e,nodes:t}=u,n=new Ue;return n.setPoints(t,e),n};class rt extends V.BaseObject{constructor(e={}){super(),this.options=E({},e)}get material(){var e;return(e=this.object3d)==null?void 0:e.material}create(){return se(this,null,function*(){const{nodes:e,nodesArr:t,geometry:n,geometryArr:s,material:i,useGroups:a,setPointWidth:m,lineWidthArr:r,materialParameters:f}=this.options;let o=i,l=n;!o&&f&&(o=this.getMaterial(f)),!l&&e?l=me({nodes:e,setPointWidth:m}):!l&&t?l=D(t.map((b,d)=>{let y=m;return!y&&r&&(y=()=>{var C;return(C=r[d])!=null?C:r[0]}),me({nodes:b,setPointWidth:y})}),a!=null?a:0):!l&&s&&s.length>1?l=D(s,a!=null?a:0):!l&&s&&s.length===1&&([l]=s),this.createMesh(l,o)})}setGeometry(e,t){const n=me({nodes:e,setPointWidth:t}),s=this.object3d,i=s.geometry;s.geometry=n,i.dispose()}getMaterial(e){const{width:t,height:n}=this.pencil.getSize(),s=new V.MeshLineMaterial(E({color:new c.Color("#ffffff")},e));return s.uniforms.resolution.value.set(t,n),s}addGeometries(e){const t=this.object3d,n=D([t.geometry,...e]);t.geometry=n}resize(e,t){var n,s;(s=(n=this.material)==null?void 0:n.uniforms)==null||s.resolution.value.set(e,t)}handleMaterialChange(e){if(e){const{width:t,height:n}=this.pencil.getSize();this.resize(t,n)}}animate({duration:e=1e3,delay:t=0,repeat:n=0,lineLoop:s,onRepeat:i,onUpdate:a,onComplete:m,startShow:r}={}){const{offset:f,offsetLoop:o}=this.material.uniforms;if(this.material.userData.tween)return;const l=s!=null?s:!0;f.value.x=1,o.value=l&&r?1:0;let b=0;const d=new ee.Tween(f.value).to({x:-1},e).delay(t).repeat(n).onUpdate(({x:y})=>{l&&y<=0&&o.value===0&&(o.value=1),a&&a(y)}).onRepeat(()=>{b+=1,i&&i(b)}).onComplete(()=>{m&&m()}).start();this.material.userData.tween=d}render(){const{width:e,height:t}=this.pencil.getSize();this.resize(e,t),this.object3d.raycast=it}dispose(){this.material.userData.tween&&(this.material.userData.tween.stop(),ee.remove(this.material.userData.tween)),super.dispose()}}const _e=u=>{const m=u,{coordinate:e,startHeight:t,height:n}=m,s=de(m,["coordinate","startHeight","height"]);let i=t||0;return typeof t!="undefined"&&typeof n!="undefined"&&(i=t+n),new V.PolygonGeometry([e],le(E({},s),{startHeight:t,endHeight:i}))};class at extends V.BaseObject{constructor(e){super(),this.options=E({},e)}create(){const r=this.options,{geometry:e,coordinateArr:t,coordinate:n,material:s,useGroups:i}=r,a=de(r,["geometry","coordinateArr","coordinate","material","useGroups"]);let m=e;if(!m&&n)m=_e(E({coordinate:n},a));else if(!m&&t){const f=t.map(o=>_e(E({coordinate:o},a)));m=D(f,i!=null?i:0)}this.createMesh(m,s)}}class ct extends J{constructor(e,t){super(e,t);const n=new he.Brush(new J(e,le(E({},t),{hasTop:!0,hasSide:!0,hasBottom:!1})));n.updateMatrixWorld();const s=new c.Box3().setFromObject(n),i=new c.Vector3;s.getSize(i);const a=new c.Vector3(s.min.x+i.x/2,s.min.y+i.y/2,0);let m=t.topSegments,r=t.box3;if(r){r=r.union(s);const M=new c.Vector3;r.getSize(M);const B=Math.max(i.x/M.x,i.y/M.y);m=Math.ceil(t.topSegments*B)}if(m<4)return this;const f=new c.PlaneGeometry(i.x,i.y,m,m),o=new he.Brush(f);o.position.set(a.x,a.y,a.z),o.updateMatrixWorld();const b=new he.Evaluator().evaluate(o,n,he.INTERSECTION),d=b.geometry.getAttribute("position"),y=new c.Float32BufferAttribute(d.count*2,2);for(let M=0;M<d.count;M++){const B=d.getZ(M);d.setZ(M,t.depth+B)}if(r){const M=r.min,B=r.max,S=new c.Vector3().subVectors(B,M);for(let P=0;P<d.count;P++){const Q=d.getX(P),H=d.getY(P),Y=(Q-M.x)/S.x,U=(H-M.y)/S.y;y.setXY(P,Y,U)}b.geometry.setAttribute("uv",y)}d.needsUpdate=!0;const C=new J(e,le(E({},t),{hasTop:!1})),A=D([b.geometry,C],2);this.copy(A.toNonIndexed())}}const ze=u=>{const{split:e,depth:t,points:n,box3:s,hasTop:i,hasBottom:a,hasSide:m,sideRepeat:r,topSegments:f}=u,o=f?ct:J,l=new o(new c.Shape(n),{depth:t,bevelEnabled:!1,box3:s,UVGenerator:Ve.getUVGenerator({split:e,box3:s,sideRepeat:r}),hasTop:i,hasBottom:a,hasSide:m,topSegments:f});return Ve.claerUVGenerator(),l};class lt extends V.BaseObject{constructor(e){super(),this.options=E({depth:1},e)}create(){return se(this,null,function*(){const{points:e,pointsArr:t,useGroups:n,depth:s,geometry:i,geometryArr:a,material:m,box3:r,split:f,hasTop:o,hasBottom:l,hasSide:b}=this.options,d=Array.isArray(s)?s:[s],y=Array.isArray(r)?r:[r],C=m;let A=i;C||console.log("material is null"),!A&&e?A=ze({points:e,depth:d[0],box3:y[0],split:f,hasTop:o,hasBottom:l,hasSide:b}):!A&&t?A=D(t.map((M,B)=>{var S,P;return ze({points:M,depth:(S=d[B])!=null?S:d[0],box3:(P=y[B])!=null?P:y[0],split:f,hasTop:o,hasBottom:l,hasSide:b})}),n!=null?n:0):!A&&a&&a.length>1?A=D(a,n!=null?n:0):!A&&a&&a.length===1&&([A]=a),this.createMesh(A,C)})}addGeometries(e){const t=this.object3d,n=D([t.geometry,...e]);t.geometry=n}setTextureAnisotropic(e,t){e.anisotropy=t||this.pencil.renderer.capabilities.getMaxAnisotropy()}}const ht=u=>{const{topColor:e,sideColor:t,sideMap:n,createCanvasObjectURL:s,split:i,maxAnisotropy:a}=u;return new Promise(m=>{const r=n?document.createElement("img"):{src:"",onload:()=>{},width:128,height:128};r.onload=()=>{const f=i,o=document.createElement("canvas"),l=o.getContext("2d");o.height=r.height/(1-f),o.width=r.width,f&&e&&(l.fillStyle=e,l.fillRect(0,0,r.width,o.height*f)),n&&r instanceof HTMLImageElement?l.drawImage(r,0,o.height*f,r.width,r.height):t&&(l.fillStyle=t,l.fillRect(0,o.height*f,r.width,r.height)),s&&o.toBlob(d=>{console.log(URL.createObjectURL(d))});const b=new c.CanvasTexture(o);m(b)},n?r.src=n:r instanceof HTMLImageElement||r.onload()})};exports.MeshLineMaterial=V.MeshLineMaterial;exports.getConicPolygonGeometry=V.PolygonGeometry;exports.getConicPolygonGeometryMetas=V.getMetas;Object.defineProperty(exports,"LineSegmentsGeometry",{enumerable:!0,get:()=>Oe.LineSegmentsGeometry});Object.defineProperty(exports,"Line2Material",{enumerable:!0,get:()=>Ie.LineMaterial});exports.ConicPolygon=at;exports.ExtrudePolygon=lt;exports.Group=Qe;exports.Light=st;exports.Line=rt;exports.Line2=ot;exports.MeshLineGeometry=Ue;exports.Node=Je;exports.Pie=nt;exports.getSplitTexture=ht;
|