<!-- SOLUV · part 545 -->
ex(a),this.setAttribute("position",new Tt(o,3)),this.setAttribute("normal",new Tt(l,3)),this.setAttribute("uv",new Tt(c,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new s(t.radius,t.height,t.capSegments,t.radialSegments,t.heightSegments)}},Io=class s extends Yt{constructor(t=1,e=32,n=0,i=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:i},e=Math.max(3,e);let r=[],a=[],o=[],l=[],c=new C,h=new nt;a.push(0,0,0),o.push(0,0,1),l.push(.5,.5);for(let d=0,u=3;d<=e;d++,u+=3){let f=n+d/e*i;c.x=t*Math.cos(f),c.y=t*Math.sin(f),a.push(c.x,c.y,c.z),o.push(0,0,1),h.x=(a[u]/t+1)/2,h.y=(a[u+1]/t+1)/2,l.push(h.x,h.y)}for(let d=1;d<=e;d++)r.push(d,d+1,0);this.setIndex(r),this.setAttribute("position",new Tt(a,3)),this.setAttribute("normal",new Tt(o,3)),this.setAttribute("uv",new Tt(l,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new s(t.radius,t.segments,t.thetaStart,t.thetaLength)}},Ar=class s extends Yt{constructor(t=1,e=1,n=1,i=32,r=1,a=!1,o=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:i,heightSegments:r,openEnded:a,thetaStart:o,thetaLength:l};let c=this;i=Math.floor(i),r=Math.floor(r);let h=[],d=[],u=[],f=[],p=0,_=[],g=n/2,m=0;S(),a===!1&&(t>0&&b(!0),e>0&&b(!1)),this.setIndex(h),this.setAttribute("position",new Tt(d,3)),this.setAttribute("normal",new Tt(u,3)),this.setAttribute("uv",new Tt(f,2));function S(){let x=new C,E=new C,T=0,R=(e-t)/n;for(let v=0;v<=r;v++){let A=[],I=v/r,L=I*(e-t)+t;for(let F=0;F<=i;F++){let z=F/i,D=z*l+o,B=Math.sin(D),X=Math.cos(D);E.x=L*B,E.y=-I*n+g,E.z=L*X,d.push(E.x,E.y,E.z),x.set(B,R,X).normalize(),u.push(x.x,x.y,x.z),f.push(z,1-I),A.push(p++)}_.push(A)}for(let v=0;v<i;v++)for(let A=0;A<r;A++){let I=_[A][v],L=_[A+1][v],F=_[A+1][v+1],z=_[A][v+1];(t>0||A!==0)&&(h.push(I,L,z),T+=3),(e>0||A!==r-1)&&(h.push(L,F,z),T+=3)}c.addGroup(m,T,0),m+=T}function b(x){let E=p,T=new nt,R=new C,v=0,A=x===!0?t:e,I=x===!0?1:-1;for(let F=1;F<=i;F++)d.push(0,g*I,0),u.push(0,I,0),f.push(.5,.5),p++;let L=p;for(let F=0;F<=i;F++){let D=F/i*l+o,B=Math.cos(D),X=Math.sin(D);R.x=A*X,R.y=g*I,R.z=A*B,d.push(R.x,R.y,R.z),u.push(0,I,0),T.x=B*.5+.5,T.y=X*.5*I+.5,f.push(T.x,T.y),p++}for(let F=0;F<i;F++){let z=E+F,D=L+F;x===!0?h.push(D,D+1,z):h.push(D+1,D,z),v+=3}c.addGroup(m,v,x===!0?1:2),m+=v}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new s(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}},wr=class s extends Ar{constructor(t=1,e=1,n=32,i=1,r=!1,a=0,o=Math.PI*2){super(0,t,e,n,i,r,a,o),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:i,openEnded:r,thetaStart:a,thetaLength:o}}static fromJSON(t){return new s(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}},_i=class s extends Yt{constructor(t=[],e=[],n=1,i=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:i};let r=[],a=[];o(i),c(n),h(),this.setAttribute("position",new Tt(r,3)),this.setAttribute("normal",new Tt(r.slice(),3)),this.setAttribute("uv",new Tt(a,2)),i===0?this.computeVertexNormals():this.normalizeNormals();function o(S){let b=new C,x=new C,E=new C;for(let T=0;T<e.length;T+=3)f(e[T+0],b),f(e[T+1],x),f(e[T+2],E),l(b,x,E,S)}function l(S,b,x,E){let T=E+1,R=[];for(let v=0;v<=T;v++){R[v]=[];let A=S.clone().lerp(x,v/T),I=b.clone().lerp(x,v/T),L=T-v;for(let F=0;F<=L;F++)F===0&&v===T?R[v][F]=A:R[v][F]=A.clone().lerp(I,F/L)}for(let v=0;v<T;v++)for(let A=0;A<2*(T-v)-1;A++){let I=Math.floor(A/2);A%2===0?(u(R[v][I+1]),u(R[v+1][I]),u(R[v][I])):(u(R[v][I+1]),u(R[v+1][I+1]),u(R[v+1][I]))}}function c(S){let b=new C;for(let x=0;x<r.length;x+=3)b.x=r[x+0],b.y=r[x+1],b.z=r[x+2],b.normalize().multiplyScalar(S),r[x+0]=b.x,r[x+1]=b.y,r[x+2]=b.z}function h(){let S=new C;for(let b=0;b<r.length;b+=3){S.x=r[b+0],S.y=r[b+1],S.z=r[b+2];let x=g(S)/2/Math.PI+.5,E=m(S)/Math.PI+.5;a.push(x,1-E)}p(),d()}function d(){for(let S=0;S<a.length;S+=6){let b=a[S+0],x=a[S+2],E=a[S+4],T=Math.max(b,x,E),R=Math.min(b,x,E);T>.9&&R<.1&&(b<.2&&(a[S+0]+=1),x<.2&&(a[S+2]+=1),E<.2&&(a[S+4]+=1))}}function u(S){r.push(S.x,S.y,S.z)}function f(S,b){let x=S*3;b.x=t[x+0],b.y=t[x+1],b.z=t[x+2]}function p(){let S=new C,b=new C,x=new C,E=new C,T=new nt,R=new nt,v=new nt;for(let A=0,I=0;A<r.length;A+=9,I+=6){S.set(r[A+0],r[A+1],r[A+2]),b.set(r[A+3],r[A+4],r[A+5]),x.set(r[A+6],r[A+7],r[A+8]),T.set(a[I+0],a[I+1]),R.set(a[I+2],a[I+3]),v.set(a[I+4],a[I+5]),E.copy(S).add(b).add(x).divideScalar(3);let L=g(E);_(T,I+0,S,L),_(R,I+2,b,L),_(v,I+4,x,L)}}function _(S,b,x,E){E<0&&S.x===1&&(a[b]=S.x-1),x.x===0&&x.z===0&&(a[b]=E/2/Math.PI+.5)}function g(S){return Math.atan2(S.z,-S.x)}function m(S){return Math