"use strict";(Object("undefined"!=typeof self?self:this).webpackChunk_transferwise_comparison_components_comparison_self_serve=Object("undefined"!=typeof self?self:this).webpackChunk_transferwise_comparison_components_comparison_self_serve||[]).push([[636],{426:function(e,t,n){n.d(t,{f:function(){return i}});var r=n(4119),s=n(9437),c=n(9949);function i(e,t){const n=r.useRef(),[i]=r.useState((()=>t?t instanceof s.Object3D?{current:t}:t:n)),[a]=r.useState((()=>new s.AnimationMixer(void 0)));r.useLayoutEffect((()=>{t&&(i.current=t instanceof s.Object3D?t:t.current),a._root=i.current}));const o=r.useRef({}),u=r.useMemo((()=>{const t={};return e.forEach((e=>Object.defineProperty(t,e.name,{enumerable:!0,get(){if(i.current)return o.current[e.name]||(o.current[e.name]=a.clipAction(e,i.current))},configurable:!0}))),{ref:i,clips:e,actions:t,names:e.map((e=>e.name)),mixer:a}}),[e]);return(0,c.C)(((e,t)=>a.update(t))),r.useEffect((()=>{const e=i.current;return()=>{o.current={},a.stopAllAction(),Object.values(u.actions).forEach((t=>{e&&a.uncacheAction(t,e)}))}}),[e]),u}},636:function(e,t,n){n.r(t),n.d(t,{default:function(){return f}});var r=n(2603),s=n(426),c=n(9949),i=n(4119),a=n(9437),o=n(6574),u=n(4848);const f=()=>{const e=(0,i.useRef)(),t=(0,r.p)((0,o.d)("multi-currency.glb")),n=(0,c.F)(a.ObjectLoader,(0,o.d)("multi-currency-light.json")),f=(0,c.F)(a.TextureLoader,(0,o.d)("wise-flag-map-bump.jpg")),m=[];t.scene.traverse((e=>{if(e.name.includes("Note")&&(e.castShadow=!0,e.receiveShadow=!0),e.name.startsWith("Coin_")&&e.isMesh){const{material:t}=e;t.bumpMap=f,t.bumpMap.flipY=!1,t.bumpScale=1,t.color=new a.Color(.49,.49,.49),e.castShadow=!1,e.receiveShadow=!1}e.name.startsWith("NoteBase_")&&e.isMesh&&m.push(e.material.map),e.name.includes("Wise")&&e.isMesh&&m.push(e.material.map)}));const{mixer:p,clips:l}=(0,s.f)(t.animations,e);return(0,c.C)((()=>{m.forEach((e=>{e.offset.x+=.001})),p.clipAction(l[0]).play()})),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("primitive",{ref:e,position:[-.5,-10,0],scale:1.3,object:t.scene}),(0,u.jsx)("primitive",{object:n})]})}}}]);
//# sourceMappingURL=636.comparison-self-serve.js.map