1import{chitin as d,loft as W,spindle as P,finalize as Q}from"./kit-BncmWpVT.js";import{G as A,V as Y,y as w,Q as i,a3 as U,a0 as D,ag as j}from"./global-BN0MycYQ.js";import"./surface-0IRDiFNx.js";import"./eyes-SVDomm1p.js";const t=.09,v=-.43,V=.43,p=-.18,h=.18,X=w.degToRad(35),k=w.degToRad(55);function E(s,m,y){const G=Math.cos(X),S=Math.sin(X),T=s*G-m*S,C=s*S+m*G,I=Math.cos(k),_=Math.sin(k);return new Y(T*I+y*_,C,-T*_+y*I)}const $=E(1,0,0).normalize(),f=.12,q=.0145,B=[[-.115,-.022],[0,.022],[.115,-.022]],g=w.degToRad(18),R=[[-.38,-.95],[-.3,.45],[-.22,-.5],[.22,.5],[.3,-.45],[.38,.95]];function tt(){const s=new A,m=d({color:"#4f7343",gloss:.14,surface:"striate"}),y=d({color:"#adba82",gloss:.14}),G=d({color:"#c6d199",gloss:.16}),S=d({color:"#b6c088",gloss:.16}),T=d({color:"#fbf3d4",gloss:.62,clearcoat:.4,translucent:!0}),C=d({color:"#1d2b12",gloss:.24}),I=d({color:"#8fae6a",gloss:.2}),_=d({color:"#8c9a63",gloss:.14});for(const[o,a,e,n]of[[v,p,t*.96,t],[h,V,t,t*.86]]){const c=[];for(let l=0;l<=6;l++){const u=l/6,b=w.lerp(e,n,u);c.push({at:new Y(w.lerp(o,a,u),0,0),ry:b,rz:b})}const r=new i(W(c,24),m);r.name="stem-skin",s.add(r)}{const o=new i(new U(t*.98,.0075,8,22),m);o.rotation.y=Math.PI/2,o.position.x=V-.07,o.name="stem-node",s.add(o)}const z=new i(new D(t,t,h-p,28,1,!0,Math.PI/6,2*Math.PI/3),m);z.rotation.z=-Math.PI/2,z.position.x=(p+h)/2,z.name="stem-skin",s.add(z);const x=new i(new D(t*.86,t*.86,h-p-.006,28,1,!0,7*Math.PI/36,11*Math.PI/18),y);x.rotation.z=-Math.PI/2,x.position.x=(p+h)/2,x.name="stem-core",s.add(x);for(const[o,a]of[[p+.005,1],[h-.005,-1]]){const e=new i(new j(t*.96,22),G);e.rotation.y=a*Math.PI/2,e.position.x=o,e.name="stem-face",s.add(e)}{const a=Math.sqrt(t*t-.003025)-.002,e=[],n=10;for(let M=0;M<=n;M++){const r=M/n,l=r<.08?.55+r/.08*.45:r>.92?.55+(1-r)/.08*.45:1;e.push({at:new Y(w.lerp(p+.004,h-.004,r),-.055,0),ry:.03,rz:a*l})}const c=new i(W(e,20),S);c.name="egg-bed",s.add(c)}const H=P([0,0,0],[f,0,0],q,{bulge:.46,steps:14,taperStart:.16,taperEnd:.06});for(const[o,a]of B){const e=new i(P([o-f*.62*Math.cos(g),-.028+f*.62*Math.sin(g),a],[o+f*.62*Math.cos(g),-.028-f*.62*Math.sin(g),a],q*1.75,{bulge:.5,steps:10,flat:1.35,taperStart:.2,taperEnd:.2}),_);e.name="egg-slot",s.add(e);const n=new i(H,T);n.name="egg",n.rotation.z=-g,n.position.set(o-Math.cos(g)*f*.5,-.004+Math.sin(g)*f*.5,a),s.add(n)}for(const[o,a]of R){const n=Math.cos(a),c=Math.sin(a),M=new i(P([o-.055,t*.99*n,t*.99*c],[o+.055,t*.99*n,t*.99*c],.0085,{bulge:.5,steps:8,taperStart:.05,taperEnd:.05}),C);M.name="scar",s.add(M);for(const r of[1,-1]){const l=.017*r,u=-c*l,b=n*l,N=new i(P([o-.055*.85,t*1.01*n+u,t*1.01*c+b],[o+.055*.85,t*1.01*n+u,t*1.01*c+b],.0065,{bulge:.5,steps:8,taperStart:.1,taperEnd:.1}),I);N.name="scar-lip",s.add(N)}}const L=new A;s.rotation.set(0,k,X),L.add(s);const O={stem:E(0,0,0),egg:E(0,.02,.022),scar:E(R[3][0],t*Math.cos(R[3][1]),t*Math.sin(R[3][1])),core:E(p+.02,-.02,0)};return Q(L,O)}export{$ as STEM_DIR,t as STEM_R,tt as buildDragonflyEgg,E as toModel};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.