<!-- SOLID-PLAYTIME · part 163 -->
ew Qn,o=new C(1,1,1),l=new C;for(let c=0;c<6;c+=1){let u=i.x+(c-3)*3.8,f=i.z+18+c*1.8;l.set(u,this.ground(u,f)+0.4,f),r.setFromAxisAngle(Ne.DEFAULT_UP,c*0.4),a.compose(l,r,o),s.setMatrixAt(c,a)}s.instanceMatrix.needsUpdate=!0,this.visionGroup.add(s)});let n=new ns(1.1);this.shardInstances=new Ki(n,this.mat(16777215,5627903),le.length),le.forEach((i,s)=>{let a=new C(i.x+11,this.ground(i.x+11,i.z+13)+3,i.z+13);this.shards.push({position:a,visible:!this.progress.shards.includes(AM[s]??"STAR")})}),this.updateShardInstances(),this.visionGroup.add(this.shardInstances)}updateShardInstances(){if(!this.shardInstances)return;let t=new ie,e=new Qn,n=new C;this.shards.forEach((i,s)=>{e.setFromAxisAngle(Ne.DEFAULT_UP,this.t*1.08+s*0.2);let a=this.ground(i.position.x,i.position.z)+3+Math.sin(this.t*3+s)*0.35,r=this.tempTarget.set(i.position.x,a,i.position.z);n.setScalar(i.visible?1:0),t.compose(r,e,n),this.shardInstances?.setMatrixAt(s,t)}),this.shardInstances.instanceMatrix.needsUpdate=!0}buildWorldSkin(){let t=new cn(1,0.035,3,this.mobile?44:72),e=[];le.forEach((m,x)=>{let S=x===le.length-1?7:3;for(let A=0;A<S;A+=1)e.push({x:m.x,y:this.ground(m.x,m.z)+0.24+A*0.025,z:m.z,radius:9+A*3.7,twist:x*0.19+A*0.13})});for(let m=0;m<5;m+=1)e.push({x:0,y:this.ground(0,0)+0.2+m*0.025,z:0,radius:14+m*4.4,twist:m*0.17});for(let m=0;m<12;m+=1){let x=m*1.73,S=Math.sin(x)*(m%3)*2.2,A=210+Math.cos(x)*(m%4)*1.6;e.push({x:S,y:this.ground(S,A)+0.38+m*0.018,z:A,radius:7+m*2.35,twist:m*0.31})}let n=new Ki(t,this.glow(16766316,0.64),e.length),i=new ie,s=new Qn,a=new C,r=new C;e.forEach((m,x)=>{r.set(m.x,m.y,m.z),s.setFromEuler(new Dn(Math.PI/2,0,m.twist)),a.set(m.radius,m.radius*(0.86+x%3*0.06),1),i.compose(r,s,a),n.setMatrixAt(x,i)}),n.instanceMatrix.needsUpdate=!0,this.world.add(n),this.worldCodeLayers.push(n);let o=[],l=[],c=new Xt(65535),u=new Xt(16711935);le.forEach((m,x)=>{let S=x%2?u:c,A=0,T=0,w=this.ground(0,0)+0.34;for(let b=1;b<=22;b+=1){let M=b/22,R=Math.sin(M*Math.PI*4+x)*(2.2+x*0.18),O=m.x*M+Math.cos(x*0.9)*R,V=m.z*M+Math.sin(x*0.9)*R,k=this.ground(O,V)+0.34;o.push(A,w,T,O,k,V);for(let et=0;et<2;et+=1)l.push(S.r,S.g,S.b);A=O,w=k,T=V}});for(let m=0;m<10;m+=1){let x=m%2?u:c,S=Math.sin(m*0.91)*5,A=210+Math.cos(m*0.91)*5,T=this.ground(S,A)+0.52;for(let w=1;w<=34;w+=1){let b=m*0.73+w*0.31,M=5+w*0.82,R=Math.sin(b)*M*0.82,O=210+Math.cos(b*0.78)*M,V=this.ground(R,O)+0.52;o.push(S,T,A,R,V,O);for(let k=0;k<2;k+=1)l.push(x.r,x.g,x.b);S=R,T=V,A=O}}let f=new me;f.setAttribute("position",new Zt(o,3)),f.setAttribute("color",new Zt(l,3));let h=new ji(f,new Sn({vertexColors:!0,transparent:!0,opacity:0.88,blending:Ye,depthWrite:!1}));this.world.add(h),this.worldCodeLayers.push(h);let p=[],v=le[le.length-1];if(v)for(let m=0;m<11;m+=1){let x=v.x,S=this.ground(v.x,v.z)+44,A=v.z;for(let T=1;T<=9;T+=1){let w=m*0.9+T*1.7,b=v.x+Math.cos(w)*T*1.7,M=S-4.6,R=v.z+Math.sin(w)*T*1.5;p.push(x,S,A,b,M,R),x=b,S=M,A=R}}let y=new me;y.setAttribute("position",new Zt(p,3));let U=new ji(y,new Sn({color:16774075,transparent:!0,opacity:0.82,blending:Ye,depthWrite:!1}));this.world.add(U),this.worldCodeLayers.push(U);let d=30,g=new Ki(new $e(5.8,0.18,5.2),this.mat(16769946,16758063,0.18),d);for(let m=0;m<d;m+=1){let x=190-m*(166/(d-1)),S=Math.sin(m*0.56)*1.25;r.set(S,this.ground(S,x)+0.24,x),s.setFromAxisAngle(Ne.DEFAULT_UP,Math.sin(m*0.4)*0.12),a.set(1,1,1),i.compose(r,s,a),g.setMatrixAt(m,i)}if(g.instanceMatrix.needsUpdate=!0,g.visible=this.progress.cleared===le.length,this.goldenRoad=g,this.world.add(g),this.addWorldWord("SOLID  •  EPISTLES",0,this.ground(0,0)+34,0,16766316,0.2),v)this.addWorldWord("SOLIDITRONIUM",v.x,this.ground(v.x,v.z)+43,v.z,65535,0.26)}addWorldWord(t,e,n,i,s,a){let r=document.createElement("canvas");r.width=1024,r.height=128;let o=r.getContext("2d");if(!o)return;o.clearRect(0,0,r.width,r.height),o.font="700 66px Cinzel, Georgia, serif",o.textAlign="center",o.textBaseline="middle",o.letterSpacing="8px",o.fillStyle=`#${new Xt(s).getHexString()}`,o.shadowColor=o.fillStyle,o.shadowBlur=22,o.fillText(t,r.width/2,r.height/2);let l=new qo(r);l.colorSpace=Hs;let c=new Nf(new Nc({map:l,transparent:!0,opacity:a,blending:Ye,depthWrite:!1}));c.position.set(e,n,i),c.scale.set(50,6.25,1),this.world.add(c)}buildParticlePool(){this.sparkGeometry.setAttribute("position",new tn(new Float32Array(this.sparkCapacity*3),3)),this.sparkGeometry.setAttribute("color",new tn(new Float32Array(this.sparkCapacity*3),3)),this.sparkGeometry.setDrawRange(0,0),this.sparkPoints=new ts(this.sparkGeometry,new Bs({size:this.mobile?0.24:0.19,transparent:!0,opacity:0.95,vertexColors:!0,blending:Ye,depthWrite:!1,sizeAttenuation:!0,map:window._roundStarTex})),this.sparkPoints.frustumCulled=!1,this.scene.add(this.sparkPoints),this.heroTrailGeometry.setAttribute("position",new tn(this.heroTrailPositions,3)),this.heroTrailGeometry.setDrawRange(0,0),this.heroTrail=new ji(this.heroTrailGeometry,new Sn({color:16765514,transparent:!0,opacity:0.46,blending:Ye,d