1import{j as a,r as i,ah as j}from"./chunk-7c95c149.js";import{C as E,D as b,u as w,f as v}from"./chunk-87cee1fa.js";import{l as A,m as F,n as z,a as P,M as f}from"./chunk-5e59878c.js";import{u as C,a as D}from"./chunk-c7147f70.js";import{u as l,l as N}from"./chunk-a256095a.js";import"./chunk-56865e9e.js";import"./chunk-bd799850.js";import"./chunk-ab25de1f.js";import"./chunk-cf010ec4.js";class R extends A{constructor(){super({blendSrc:F,blendDst:z,vertexShader:` 2 varying vec3 vNormal; 3 varying vec3 vEye; 4 void main(){ 5 vNormal = normalize(normalMatrix * normal); 6 vEye = normalize(vec3(modelViewMatrix * vec4(position, 1.0)).xyz); 7 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 8 } 9 `,fragmentShader:` 10 varying vec3 vNormal; 11 varying vec3 vEye; 12 13 void main(){ 14 float a = ( 1.0 - -min(dot(vEye, normalize(vNormal) ), 0.0) ); 15 a = pow(a, 1.2) * 2.0; 16 gl_FragColor = vec4(a) ; 17 } 18 `})}}function T({...r}){const{scene:s,animations:d,materials:_,nodes:g,cameras:n}=w("/sites/abrigo/bones.glb");i.useMemo(()=>{const e=new R;s.traverse(o=>{o instanceof P&&(o.material=e,o.parent===g.Skull_Parent&&(o.visible=!1))})},[s]);const m=i.useRef(n[0].fov),p=5725/3458,c=v(e=>e.size),t=n[0];i.useEffect(()=>{if(t.aspect=c.width/c.height,t.aspect>p)t.fov=m.current;else{const e=Math.tan(f.degToRad(m.current/2)),o=t.aspect/p,S=e/o;t.fov=f.radToDeg(Math.atan(S))*2}t.updateProjectionMatrix()},[c]);const{actions:h,mixer:x}=C(d,s),u=v(e=>e.set),M=l(e=>e.progress),y=l(e=>e.toAbsolute);return D("Animation",h,x,()=>N([3.75,9.5],[0,1])(y(M.get()))),j(()=>u({camera:n[0]}),[n,u]),a.jsx(a.Fragment,{children:a.jsx("primitive",{object:s,...r})})}function V({render:r=!0}){return a.jsxs(E,{gl:{alpha:!1},dpr:1,style:{pointerEvents:"inherit"},children:[!r&&a.jsx(b,{}),a.jsx(i.Suspense,{fallback:null,children:a.jsx(T,{})})]})}function J(){const r=l(s=>s.inView);return a.jsx(V,{render:r})}export{J as default};
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.