PageSourceSearch

https://twelveearths.com/assets/chunks/chunk-e2284a4a.js

js twelveearths.com collected 2026-10-06 16:19:14 UTC 12,599 bytes, 51 lines download raw bytes

1import{m as _,n as ee,j as n,r as f,W as te,X as re}from"./chunk-7c95c149.js";import{u as z,g as ne,b as oe,a as ae,C as se,D as ie}from"./chunk-87cee1fa.js";import{a as h}from"./chunk-6b9675d7.js";import{o as ce,V as L,f as ue,a as le,I as me,p as fe,R as pe,q as de,r as ge,s as he,t as N,N as xe,j as be,F as ye,u as ve}from"./chunk-5e59878c.js";import{z as p}from"./chunk-7e6dec72.js";import{l as X,u as k}from"./chunk-a256095a.js";import{u as je,a as Se}from"./chunk-c7147f70.js";import{P as we}from"./chunk-aa898620.js";import"./chunk-56865e9e.js";import"./chunk-ab25de1f.js";import"./chunk-cf010ec4.js";import"./chunk-ab9dfbfe.js";import"./chunk-bd799850.js";import"./chunk-c92baa57.js";function Ae(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var q=Ae,Te=typeof _=="object"&&_&&_.Object===Object&&_,Oe=Te,Pe=Oe,_e=typeof self=="object"&&self&&self.Object===Object&&self,Le=Pe||_e||Function("return this")(),J=Le,Ie=J,Me=function(){return Ie.Date.now()},$e=Me,Ee=/\s/;function Fe(e){for(var t=e.length;t--&&Ee.test(e.charAt(t)););return t}var ke=Fe,ze=ke,Ce=/^\s+/;function De(e){return e&&e.slice(0,ze(e)+1).replace(Ce,"")}var Ne=De,Re=J,Ge=Re.Symbol,Y=Ge,R=Y,K=Object.prototype,We=K.hasOwnProperty,Be=K.toString,T=R?R.toStringTag:void 0;function Ue(e){var t=We.call(e,T),r=e[T];try{e[T]=void 0;var o=!0}catch{}var s=Be.call(e);return o&&(t?e[T]=r:delete e[T]),s}var He=Ue,Ve=Object.prototype,Xe=Ve.toString;function qe(e){return Xe.call(e)}var Je=qe,G=Y,Ye=He,Ke=Je,Qe="[object Null]",Ze="[object Undefined]",W=G?G.toStringTag:void 0;function et(e){return e==null?e===void 0?Ze:Qe:W&&W in Object(e)?Ye(e):Ke(e)}var tt=et;function rt(e){return e!=null&&typeof e=="object"}var nt=rt,ot=tt,at=nt,st="[object Symbol]";function it(e){return typeof e=="symbol"||at(e)&&ot(e)==st}var ct=it,ut=Ne,B=q,lt=ct,U=0/0,mt=/^[-+]0x[0-9a-f]+$/i,ft=/^0b[01]+$/i,pt=/^0o[0-7]+$/i,dt=parseInt;function gt(e){if(typeof e=="number")return e;if(lt(e))return U;if(B(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=B(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ut(e);var r=ft.test(e);return r||pt.test(e)?dt(e.slice(2),r?2:8):mt.test(e)?U:+e}var ht=gt,xt=q,F=$e,H=ht,bt="Expected a function",yt=Math.max,vt=Math.min;function jt(e,t,r){var o,s,i,a,c,l,u=0,y=!1,b=!1,S=!0;if(typeof e!="function")throw new TypeError(bt);t=H(t)||0,xt(r)&&(y=!!r.leading,b="maxWait"in r,i=b?yt(H(r.maxWait)||0,t):i,S="trailing"in r?!!r.trailing:S);function w(m){var g=o,A=s;return o=s=void 0,u=m,a=e.apply(A,g),a}function M(m){return u=m,c=setTimeout(P,t),y?w(m):a}function $(m){var g=m-l,A=m-u,D=t-g;return b?vt(D,i-A):D}function O(m){var g=m-l,A=m-u;return l===void 0||g>=t||g<0||b&&A>=i}function P(){var m=F();if(O(m))return C(m);c=setTimeout(P,$(m))}function C(m){return c=void 0,S&&o?w(m):(o=s=void 0,a)}function Q(){c!==void 0&&clearTimeout(c),u=0,o=l=s=c=void 0}function Z(){return c===void 0?a:C(F())}function E(){var m=F(),g=O(m);if(o=arguments,s=this,l=m,g){if(c===void 0)return M(l);if(b)return clearTimeout(c),c=setTimeout(P,t),w(l)}return c===void 0&&(c=setTimeout(P,t)),a}return E.cancel=Q,E.flush=Z,E}var St=jt;const wt=ee(St);function x(){const[e,t]=f.useState([0,0,0]),r=te({rotation:e,config:{...re.wobbly,mass:2}}),o=f.useCallback(i=>{const a=i.object.worldToLocal(i.point);wt(t,500,{leading:!0})([a.y*1.5,a.x*1.5,a.z*1.5])},[t]),s=f.useCallback(()=>{t([0,0,0])},[t]);return[r,()=>({onPointerEnter:o,onPointerLeave:s})]}function At(e){const{nodes:t,materials:r}=z("/sites/abrigo/pendant/scene.glb"),[o,s]=x(),[i,a]=x(),[c,l]=x(),[u,y]=x();return n.jsxs("group",{...e,dispose:null,children:[n.jsx("group",{position:[-.4,0,2.928],rotation:[0,-.224,0],children:n.jsx(h.group,{...i,children:n.jsx("mesh",{castShadow:!0,receiveShadow:!0,geometry:t.A2.geometry,material:r["A2.001"],position:[-.017,.068,-.018],rotation:[-.415,.045,1.517],...a()})})}),n.jsx("group",{position:[-.177,.001,2.985],children:n.jsx(h.group,{...c,children:n.jsx("mesh",{castShadow:!0,receiveShadow:!0,geometry:t.A3.geometry,material:r["A3.001"],position:[.053,.165,-.034],rotation:[-.215,-.003,-2.254],...l()})})}),n.jsx("group",{position:[.155,0,2.985],rotation:[0,-.112,0],children:n.jsx(h.group,{...u,children:n.jsx("mesh",{castShadow:!0,receiveShadow:!0,geometry:t.A4.geometry,material:r["A4.001"],position:[.033,.133,-.014],rotation:[-.002,.071,-2.253],...y()})})}),n.jsx("group",{position:[.415,0,2.978],rotation:[0,.313,0],children:n.jsx(h.group,{...o,children:n.jsx("mesh",{castShadow:!0,receiveShadow:!0,geometry:t.A1.geometry,material:r["A1.001"],position:[-.004,.077,-.077],rotation:[-.034,-.201,.695],...s()})})})]})}const Tt=(e,t=1)=>{const r=[];for(let o=0;o<e.length;o+=1){const s=e[o],i=e[o+1];if(!i)break;r.push(new ce(new L(s.px,s.pz,s.py).multiplyScalar(t),new L(s.hrx,s.hrz,s.hry).multiplyScalar(t),new L(i.hlx,i.hlz,i.hly).multiplyScalar(t),new L(i.px,i.pz,i.py).multiplyScalar(t)))}return r},Ot=p.object({id:p.coerce.number(),px:p.coerce.number(),py:p.coerce.number(),pz:p.coerce.number(),hlx:p.coerce.number(),hly:p.coerce.number(),hlz:p.coerce.number(),hrx:p.coerce.number(),hry:p.coerce.number(),hrz:p.coerce.number()}),v=4,j=4096,d=4;function Pt(e=1){const t=new Float32Array(j*d*e*v),r=new de(t,j,d*e,ge,he);return r.wrapS=N,r.wrapY=N,r.magFilter=xe,r.needsUpdate=!0,r}function _t(e,t,r=0){const o=Math.floor(j*(d/4));t.arcLengthDivisions=o/2,t.updateArcLengths();const s=t.getSpacedPoints(o),i=t.computeFrenetFrames(o,!0);for(let a=0;a<o;a++){const c=Math.floor(a/j),l=a%j;let u=s[a];I(e,l,u.x,u.y,u.z,0+c+d*r),u=i.tangents[a],I(e,l,u.x,u.y,u.z,1+c+d*r),u=i.normals[a],I(e,l,u.x,u.y,u.z,2+c+d*r),u=i.binormals[a],I(e,l,u.x,u.y,u.z,3+c+d*r)}e.needsUpdate=!0}function I(e,t,r,o,s,i){const a=e.image,{data:c}=a,l=v*j*i;c[t*v+l+0]=r,c[t*v+l+1]=o,c[t*v+l+2]=s,c[t*v+l+3]=1}function Lt(e){return{spineTexture:{value:e},pathOffset:{type:"f",value:0},pathSegment:{type:"f",value:1},spineOffset:{type:"f",value:161},spineLength:{type:"f",value:400},flow:{type:"i",value:1}}}function V(e,t,r=1){e.__ok||(e.__ok=!0,e.onBeforeCompile=o=>{if(o.__modified)return;o.__modified=!0,Object.assign(o.uniforms,t);const s=`
2		uniform sampler2D spineTexture;
3		uniform float pathOffset;
4		uniform float pathSegment;
5		uniform float spineOffset;
6		uniform float spineLength;
7		uniform int flow;
8
9		float textureLayers = ${d*r}.;
10		float textureStacks = ${d/4}.;
11
12		${o.vertexShader}
13		`.replace("#include <beginnormal_vertex>","").replace("#include <defaultnormal_vertex>","").replace("#include <begin_vertex>","").replace(/void\s*main\s*\(\)\s*\{/,`
14void main() {
15#include <beginnormal_vertex>
16
17vec4 worldPos = modelMatrix * vec4(position, 1.);
18
19bool bend = flow > 0;
20float xWeight = bend ? 0. : 1.;
21
22#ifdef USE_INSTANCING
23float pathOffsetFromInstanceMatrix = instanceMatrix[3][2];
24float spineLengthFromInstanceMatrix = instanceMatrix[3][0];
25float spinePortion = bend ? (worldPos.x + spineOffset) / spineLengthFromInstanceMatrix : 0.;
26float mt = (spinePortion * pathSegment + pathOffset + pathOffsetFromInstanceMatrix)*textureStacks;
27#else
28float spinePortion = bend ? (worldPos.x + spineOffset) / spineLength : 0.;
29float mt = (spinePortion * pathSegment + pathOffset)*textureStacks;
30#endif
31
32mt = mod(mt, textureStacks);
33float rowOffset = floor(mt);
34
35#ifdef USE_INSTANCING
36rowOffset += instanceMatrix[3][1] * ${d}.;
37#endif
38
39vec3 spinePos = texture2D(spineTexture, vec2(mt, (0. + rowOffset + 0.5) / textureLayers)).xyz;
40vec3 a =        texture2D(spineTexture, vec2(mt, (1. + rowOffset + 0.5) / textureLayers)).xyz;
41vec3 b =        texture2D(spineTexture, vec2(mt, (2. + rowOffset + 0.5) / textureLayers)).xyz;
42vec3 c =        texture2D(spineTexture, vec2(mt, (3. + rowOffset + 0.5) / textureLayers)).xyz;
43mat3 basis = mat3(a, b, c);
44
45vec3 transformed = basis
46	* vec3(worldPos.x * xWeight, worldPos.y * 1., worldPos.z * 1.)
47	+ spinePos;
48
49vec3 transformedNormal = normalMatrix * (basis * objectNormal);
50			`).replace("#include <project_vertex>",`vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );
51				gl_Position = projectionMatrix * mvPosition;`);o.vertexShader=s})}class It{constructor(t,r=1){const o=t.clone(),s=Pt(r),i=Lt(s);o.traverse(function(a){(a instanceof le||a instanceof me)&&(a.material=a.material.clone(),V(a.material,i,r),a.customDepthMaterial=new fe({depthPacking:pe}),V(a.customDepthMaterial,i,r))}),this.curveArray=new Array(r),this.curveLengthArray=new Array(r),this.object3D=o,this.splineTexure=s,this.uniforms=i}updateCurve(t,r){if(t>=this.curveArray.length)throw Error("Index out of range for Flow");const o=r.getLength();this.uniforms.spineLength.value=o,this.curveLengthArray[t]=o,this.curveArray[t]=r,_t(this.splineTexure,r,t)}moveAlongCurve(t){this.uniforms.pathOffset.value+=t}setOffsetAlongCurve(t){this.uniforms.pathOffset.value=t}}new ue;const Mt=f.forwardRef(({children:e,curve:t},r)=>{const[o]=f.useState(()=>new be),[s,i]=f.useState(),a=f.useRef();return f.useEffect(()=>
51{a.current=new It(o.children[0]),i(a.current.object3D)},[]),f.useEffect(()=>{var c;t&&((c=a.current)==null||c.updateCurve(0,t))},[t]),f.useImperativeHandle(r,()=>({moveAlongCurve:c=>{var l;(l=a.current)==null||l.moveAlongCurve(c)},setOffsetAlongCurve:c=>{a.current&&a.current.setOffsetAlongCurve(c)}})),n.jsxs(n.Fragment,{children:[ne(e,o),s&&n.jsx("primitive",{object:s})]})});function $t(e){const{nodes:t,materials:r}=z("/sites/abrigo/pendant/scene.glb");return n.jsx("mesh",{castShadow:!0,receiveShadow:!0,frustumCulled:!1,geometry:t.String.geometry,material:r.String,...e,dispose:null})}const Et=X([0,1],[-.2,.16]).clamp(!0);function Ft({progress:e}){const t=f.useRef(null),r=oe(ye,"/sites/abrigo/pendant/string.json"),o=f.useMemo(()=>{const a=JSON.parse(r).map(c=>Ot.parse(c));return Tt(a)},[r]),s=f.useMemo(()=>{const i=new ve;return o.forEach(a=>i.add(a)),i},[o]);return ae(()=>{t.current&&t.current.setOffsetAlongCurve(Et(e.get()))}),n.jsx(n.Fragment,{children:n.jsx(Mt,{ref:t,curve:s,children:n.jsx($t,{})})})}const kt=X([0,.9],[0,1]);function zt(e){const t=k(O=>O.progress),r=f.useRef(null),{nodes:o,materials:s,animations:i}=z("/sites/abrigo/pendant/scene.glb"),{actions:a,mixer:c}=je(i,r);Se("Animation",a,c,()=>kt(t.get()));const[l,u]=x(),[y,b]=x(),[S,w]=x(),[M,$]=x();return n.jsx("group",{ref:r,...e,dispose:null,children:n.jsxs("group",{name:"Scene",children:[n.jsx("group",{name:"Target",position:[0,0,-3.25],children:n.jsx("group",{name:"Distance",position:[0,5,0],children:n.jsx(we,{name:"Camera",makeDefault:!0,far:1e3,near:.1,fov:25.361,rotation:[-Math.PI/2,0,0]})})}),n.jsx("group",{name:"A1_Parent_Solo",position:[.871,0,.057],rotation:[0,.313,0],children:n.jsx(h.group,{...l,children:n.jsx("mesh",{name:"A1001",castShadow:!0,receiveShadow:!0,geometry:o.A1001.geometry,material:s["A1.001"],position:[-.004,.077,-.077],rotation:[-.034,-.201,.695],...u()})})}),n.jsx("group",{name:"A2_Parent_Solo",position:[-1.24,0,.839],rotation:[0,-.224,0],children:n.jsx(h.group,{...y,children:n.jsx("mesh",{name:"A2001",castShadow:!0,receiveShadow:!0,geometry:o.A2001.geometry,material:s["A2.001"],position:[-.017,.068,-.018],rotation:[-.415,.045,1.517],...b()})})}),n.jsx("group",{name:"A3_Parent_Solo",position:[-.365,.001,-2.643],rotation:[0,-.167,0],children:n.jsx(h.group,{...S,children:n.jsx("mesh",{name:"A3001",castShadow:!0,receiveShadow:!0,geometry:o.A3001.geometry,material:s["A3.001"],position:[.053,.165,-.034],rotation:[-.215,-.003,-2.254],...w()})})}),n.jsx("group",{name:"A4_Parent_Solo",position:[.969,0,-3.891],rotation:[0,.285,0],children:n.jsx(h.group,{...M,children:n.jsx("mesh",{name:"A4001",castShadow:!0,receiveShadow:!0,geometry:o.A4001.geometry,material:s["A4.001"],position:[.033,.133,-.014],rotation:[-.002,.071,-2.253],...$()})})})]})})}function Ct({progress:e,render:t=!0}){return n.jsxs(se,{shadows:!0,dpr:1,style:{pointerEvents:"inherit"},children:[!t&&n.jsx(ie,{}),n.jsxs(f.Suspense,{fallback:null,children:[n.jsx(zt,{}),n.jsx(Ft,{progress:e}),n.jsx(At,{})]}),n.jsx("directionalLight",{intensity:1,position:[-2,5,-4],castShadow:!0,color:"#fbe3d3","shadow-mapSize":1024,"shadow-bias":-1e-4,"shadow-camera-near":-2,"shadow-camera-far":10,"shadow-camera-left":-3,"shadow-camera-right":3,"shadow-camera-top":3,"shadow-camera-bottom":-3,"shadow-normalBias":.001}),n.jsx("color",{attach:"background",args:["#eee"]}),n.jsx("ambientLight",{intensity:.6}),n.jsxs("mesh",{rotation:[-.5*Math.PI,0,0],position:[0,-.01,0],receiveShadow:!0,children:[n.jsx("planeGeometry",{args:[10,10,1,1]}),n.jsx("shadowMaterial",{transparent:!0,opacity:.2})]})]})}function Qt(){const e=k(r=>r.progress),t=k(r=>r.inView);return n.jsx(Ct,{progress:e,render:t})}export{Qt 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.