<!-- SOLID-PLAYTIME · part 170 -->
,0.25]},{code:"KING-THIGH-L-01",position:[-0.3,1.14,0.28],size:[0.44,0.5]},{code:"KING-THIGH-R-01",position:[0.3,1.14,0.28],size:[0.44,0.5]},{code:"KING-SHIN-L-01",position:[-0.3,0.67,0.26],size:[0.38,0.5]},{code:"KING-SHIN-R-01",position:[0.3,0.67,0.26],size:[0.38,0.5]},{code:"KING-BOOT-L-01",position:[-0.31,0.2,0.16],size:[0.48,0.34]},{code:"KING-BOOT-R-01",position:[0.31,0.2,0.16],size:[0.48,0.34]}].forEach((z)=>{let j=new At(new qn(z.size[0],z.size[1]),d(z.code));j.position.set(...z.position),g(z.code,j)}),this.headGroup.position.set(0,3,0.25),this.hero.add(this.headGroup);let be=[M,vt,mt,...at,this.kingParts["KING-HEAD-01"],this.kingParts["KING-FACE-01"],this.kingParts["KING-CROWN-01"]];for(let z of be)this.headGroup.attach(z);this.pokeTargets=[M,b];let Ee=new At(new dn(1.52,n?10:14,8),d("KING-AURA-01",!0));Ee.position.y=2.25,Ee.scale.set(0.92,1.65,0.82),g("KING-AURA-01",Ee);let L=new Xt(t),E=new At(new fn(0.1,0.12,0.72,8),new Pe({color:1380376,metalness:0.86,roughness:0.28}));E.rotation.z=Math.PI/2;let B=new At(new $e(0.16,0.9,0.16),new Pe({color:15252050,emissive:7159560,emissiveIntensity:0.9,metalness:0.9,roughness:0.18})),tt=new At(new $e(0.15,2.65,0.08),new Pe({color:16318463,emissive:L,emissiveIntensity:2.2,metalness:0.72,roughness:0.12}));E.position.y=0.16,B.position.y=0.55,tt.position.y=1.86,this.bladePivot.add(E,B,tt),this.bladePivot.position.copy(this.SHEATH_POS),this.bladePivot.rotation.copy(this.SHEATH_ROT),this.hero.add(this.bladePivot);let st=new he;st.position.copy(this.SHEATH_POS),st.rotation.copy(this.SHEATH_ROT);let Q=new At(new $e(0.26,1.7,0.16),new Pe({color:1838856,metalness:0.35,roughness:0.6}));Q.position.y=1.25,st.add(Q);let Tt=new At(new $e(0.32,0.18,0.22),T);Tt.position.y=0.42,st.add(Tt),this.hero.add(st),this.slashMaterial=new Pn({color:L,transparent:!0,opacity:0,blending:Ye,depthWrite:!1,side:hn}),this.slashArc=new At(new cn(2.35,0.16,8,48,Math.PI*1.18),this.slashMaterial),this.slashArc.position.set(0,2.9,1.5),this.slashArc.rotation.set(0,0,-0.58),this.slashArc.visible=!1,this.hero.add(this.slashArc),this.attackLight=new On(L,0,12,2),this.attackLight.position.set(0,2.8,1.5),this.hero.add(this.attackLight),this.y=this.ground(this.x,this.z),this.hero.position.set(this.x,this.y,this.z),this.scene.add(this.hero),this.camera.position.set(this.x,this.y+7,this.z+13),this.camera.lookAt(this.x,this.y+2.2,this.z)}buildLivingStorm(t){let e=t?7:11;for(let n=0;n<e;n+=1){let i=[],s=e-1,a=-156+n*(312/Math.max(1,s)),r=172-n%3*10,o=-72-n%4*16,l=n*1.73;for(let h=0;h<10;h+=1){let p=a+Math.sin(l+h*2.2)*(7+n%4),v=r-14-h%2*2,y=o+3+Math.cos(l+h)*3;if(i.push(a,r,o,p,v,y),(h===3||h===6)&&(n+h)%2===0)i.push(p,v,y,p+(n%2?-15:15),v-15,y+6);a=p,r=v,o=y}let c=new me;c.setAttribute("position",new Zt(i,3));let u=new Sn({color:n%3===0?4490111:6724095,transparent:!0,opacity:0.46,blending:Ye,depthWrite:!1,toneMapped:!1}),f=new ji(c,u);f.userData.phase=n*1.91,f.userData.baseOpacity=0.68+n%4*0.055,this.scene.add(f),this.stormBolts.push(f)}this.stormFlash.position.set(-38,104,-96),this.scene.add(this.stormFlash)}buildBurningCastle(t){let e=new he,n=50,i=-95,s=this.ground(50,-95);e.position.set(50,s+6,-95),e.rotation.y=-0.2,e.scale.setScalar(1.38);let a=new Pe({color:1050386,emissive:3868432,emissiveIntensity:1.25,roughness:0.87,metalness:0.18}),r=new Pe({color:16752939,emissive:16731400,emissiveIntensity:4.4,roughness:0.3,metalness:0.42,toneMapped:!1}),o=new At(new $e(58,21,18),a);o.position.y=10,e.add(o);let l=new At(new $e(23,45,19),a);l.position.set(0,27,-2),e.add(l);let c=new fn(8.8,10.2,38,t?7:9);for(let p of[-24,24]){let v=new At(c,a);v.position.set(p,19,0),e.add(v);let y=new At(new Ln(11.5,16,t?7:9),a);y.position.set(p,45,0),e.add(y);let U=new On(16734488,t?52:74,180,1.7);U.position.set(p,34,8),e.add(U)}let u=new At(new Ln(7,27,8),a);u.position.set(0,62,-2),e.add(u);let f=new qn(2.2,4.2);for(let p=0;p<(t?8:13);p+=1){let v=p%5,y=Math.floor(p/5),U=new At(f,r);U.position.set((v-2)*8.5,12+y*12,9.08),e.add(U)}let h=new At(new cn(29,0.8,5,t?36:54),this.glow(16744742,0.94));h.position.y=31,h.rotation.x=Math.PI/2,e.add(h);for(let p of[-24,-12,0,12,24]){let v=new At(new Ln(2.5,10+Math.abs(p)*0.08,5),this.glow(p%24===0?16765274:16730902,0.94));v.position.set(p,38+Math.abs(p)%5,9.8),e.add(v)}this.scene.add(e),this.distantLayers.push(e)}buildDistantWorld(t){let e=new Pe({color:526868,emissive:1511458,emissiveIntensity:0.72,roughness:0.76,metalness:0.35}),n=new Pe({color:13077291,emissive:16742940,emissiveIntensity:1.2,roughness:0.35,metalness:0.62}),i=[{x:-246,z:-210,color:16766573},{x:278,z:92,color:16740668},{x:238,z:-286,color:16729062},{x:-300,z:205,color:7533823}];for(let[l,c]of i.entries()){let u=new he,f=this.ground(c.x,c.z);u.position.set(c.x,f,c.z);let h=new At(new fn(9,14,3.4,8),e);h.position.y=1.2,u.add(h);let p=new At(new Ln(4.5,31+l*3,5),l%2?n:e);p.position.y=17,u.add(p);let v=new At(new cn(11+l,0.22,5,t?28:44),this.glow(c.color,0.58));v.position.y=18+l*2,v.rotation.y