import{Q as e,d as n,n as s,p as t,C as o,q as a,v as r,s as d,r as i,o as c,c as l,w as p,a as f}from"./vendor.6afcf1a6.js";const{randFloat:u}=d;let w,m;const g=new e,h=new e,y=new e,A=[];var k=n({methods:{async onAdded({instance:e}){const n=await(new s).loadAsync("/asterisk/snoothGradient_wbw.png");if(w=e.getObjectByProperty("type","SkinnedMesh"),!w)throw"no skin detected (yuck)";w.castShadow=!0,w.receiveShadow=!0,w.material=new t({emissive:new o("#323238"),emissiveMap:n,color:"darkseagreen"}),w.skeleton.bones.forEach(((e,n)=>{A[n]=e.clone()})),this.nextSpring()},nextSpring(){const e=new a(u(-1,1),u(-1,1),u(-1,1)).normalize();h.copy(g),g.setFromAxisAngle(e,0),y.setFromAxisAngle(e,u(-.5,.5)),m=r({from:0,to:1,stiffness:150}).start({update:e=>{g.copy(h),g.slerp(y,e),w.skeleton.bones.forEach((function(e,n){e.quaternion.copy(A[n].quaternion),e.applyQuaternion(g)}))},complete:()=>{this&&this.nextSpring()}})}},beforeUnmount(){m&&m.stop()}});k.render=function(e,n,s,t,o,a){const r=i("gltf"),d=i("group");return c(),l(d,null,{default:p((()=>[f(r,{scale:10,onGltfAdded:e.onAdded,src:"/asterisk/extrudedDodec.glb"},null,8,["onGltfAdded"])])),_:1})};export{k as _};
