<!-- SOLID-PLAYTIME · part 87 -->
[m+0]=g.x,s[m+1]=g.y,s[m+2]=g.z}function c(){let d=new C;for(let g=0;g<s.length;g+=3){d.x=s[g+0],d.y=s[g+1],d.z=s[g+2];let m=y(d)/2/Math.PI+0.5,x=U(d)/Math.PI+0.5;a.push(m,1-x)}p(),u()}function u(){for(let d=0;d<a.length;d+=6){let g=a[d+0],m=a[d+2],x=a[d+4],S=Math.max(g,m,x),A=Math.min(g,m,x);if(S>0.9&&A<0.1){if(g<0.2)a[d+0]+=1;if(m<0.2)a[d+2]+=1;if(x<0.2)a[d+4]+=1}}}function f(d){s.push(d.x,d.y,d.z)}function h(d,g){let m=d*3;g.x=t[m+0],g.y=t[m+1],g.z=t[m+2]}function p(){let d=new C,g=new C,m=new C,x=new C,S=new Nt,A=new Nt,T=new Nt;for(let w=0,b=0;w<s.length;w+=9,b+=6){d.set(s[w+0],s[w+1],s[w+2]),g.set(s[w+3],s[w+4],s[w+5]),m.set(s[w+6],s[w+7],s[w+8]),S.set(a[b+0],a[b+1]),A.set(a[b+2],a[b+3]),T.set(a[b+4],a[b+5]),x.copy(d).add(g).add(m).divideScalar(3);let M=y(x);v(S,b+0,d,M),v(A,b+2,g,M),v(T,b+4,m,M)}}function v(d,g,m,x){if(x<0&&d.x===1)a[g]=d.x-1;if(m.x===0&&m.z===0)a[g]=x/2/Math.PI+0.5}function y(d){return Math.atan2(d.z,-d.x)}function U(d){return Math.atan2(-d.y,Math.sqrt(d.x*d.x+d.z*d.z))}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new zc(t.vertices,t.indices,t.radius,t.details)}}class SU{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){console.warn("THREE.Curve: .getPoint() not implemented.")}getPointAt(t,e){let n=this.getUtoTmapping(t);return this.getPoint(n,e)}getPoints(t=5){let e=[];for(let n=0;n<=t;n++)e.push(this.getPoint(n/t));return e}getSpacedPoints(t=5){let e=[];for(let n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e}getLength(){let t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;let e=[],n,i=this.getPoint(0),s=0;e.push(0);for(let a=1;a<=t;a++)n=this.getPoint(a/t),s+=n.distanceTo(i),e.push(s),i=n;return this.cacheArcLengths=e,e}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,e=null){let n=this.getLengths(),i=0,s=n.length,a;if(e)a=e;else a=t*n[s-1];let r=0,o=s-1,l;while(r<=o)if(i=Math.floor(r+(o-r)/2),l=n[i]-a,l<0)r=i+1;else if(l>0)o=i-1;else{o=i;break}if(i=o,n[i]===a)return i/(s-1);let c=n[i],f=n[i+1]-c,h=(a-c)/f;return(i+h)/(s-1)}getTangent(t,e){let i=t-0.0001,s=t+0.0001;if(i<0)i=0;if(s>1)s=1;let a=this.getPoint(i),r=this.getPoint(s),o=e||(a.isVector2?new Nt:new C);return o.copy(r).sub(a).normalize(),o}getTangentAt(t,e){let n=this.getUtoTmapping(t);return this.getTangent(n,e)}computeFrenetFrames(t,e=!1){let n=new C,i=[],s=[],a=[],r=new C,o=new ie;for(let h=0;h<=t;h++){let p=h/t;i[h]=this.getTangentAt(p,new C)}s[0]=new C,a[0]=new C;let l=Number.MAX_VALUE,c=Math.abs(i[0].x),u=Math.abs(i[0].y),f=Math.abs(i[0].z);if(c<=l)l=c,n.set(1,0,0);if(u<=l)l=u,n.set(0,1,0);if(f<=l)n.set(0,0,1);r.crossVectors(i[0],n).normalize(),s[0].crossVectors(i[0],r),a[0].crossVectors(i[0],s[0]);for(let h=1;h<=t;h++){if(s[h]=s[h-1].clone(),a[h]=a[h-1].clone(),r.crossVectors(i[h-1],i[h]),r.length()>Number.EPSILON){r.normalize();let p=Math.acos(ne(i[h-1].dot(i[h]),-1,1));s[h].applyMatrix4(o.makeRotationAxis(r,p))}a[h].crossVectors(i[h],s[h])}if(e===!0){let h=Math.acos(ne(s[0].dot(s[t]),-1,1));if(h/=t,i[0].dot(r.crossVectors(s[0],s[t]))>0)h=-h;for(let p=1;p<=t;p++)s[p].applyMatrix4(o.makeRotationAxis(i[p],h*p)),a[p].crossVectors(i[p],s[p])}return{tangents:i,normals:s,binormals:a}}clone(){return new this.constructor().copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){let t={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class zf extends SU{constructor(t=0,e=0,n=1,i=1,s=0,a=Math.PI*2,r=!1,o=0){super();this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=n,this.yRadius=i,this.aStartAngle=s,this.aEndAngle=a,this.aClockwise=r,this.aRotation=o}getPoint(t,e=new Nt){let n=e,i=Math.PI*2,s=this.aEndAngle-this.aStartAngle,a=Math.abs(s)<Number.EPSILON;while(s<0)s+=i;while(s>i)s-=i;if(s<Number.EPSILON)if(a)s=0;else s=i;if(this.aClockwise===!0&&!a)if(s===i)s=-i;else s=s-i;let r=this.aStartAngle+t*s,o=this.aX+this.xRadius*Math.cos(r),l=this.aY+this.yRadius*Math.sin(r);if(this.aRotation!==0){let c=Math.cos(this.aRotation),u=Math.sin(this.aRotation),f=o-this.aX,h=l-this.aY;o=f*c-h*u+this.aX,l=f*u+h*c+this.aY}return n.set(o,l)}copy(t){return super.copy(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}toJSON(){let t=super.toJSON();return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t}fromJSON(t){r