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