"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([[158],{426:function(e,n,t){t.d(n,{f:function(){return o}});var r=t(4119),c=t(9437),s=t(9949);function o(e,n){const t=r.useRef(),[o]=r.useState((()=>n?n instanceof c.Object3D?{current:n}:n:t)),[i]=r.useState((()=>new c.AnimationMixer(void 0)));r.useLayoutEffect((()=>{n&&(o.current=n instanceof c.Object3D?n:n.current),i._root=o.current}));const a=r.useRef({}),u=r.useMemo((()=>{const n={};return e.forEach((e=>Object.defineProperty(n,e.name,{enumerable:!0,get(){if(o.current)return a.current[e.name]||(a.current[e.name]=i.clipAction(e,o.current))},configurable:!0}))),{ref:o,clips:e,actions:n,names:e.map((e=>e.name)),mixer:i}}),[e]);return(0,s.C)(((e,n)=>i.update(n))),r.useEffect((()=>{const e=o.current;return()=>{a.current={},i.stopAllAction(),Object.values(u.actions).forEach((n=>{e&&i.uncacheAction(n,e)}))}}),[e]),u}},9158:function(e,n,t){t.r(n),t.d(n,{default:function(){return f}});var r=t(2603),c=t(426),s=t(9949),o=t(4119),i=t(9437),a=t(6574),u=t(4848);const f=()=>{const e=(0,o.useRef)(),n=(0,r.p)((0,a.d)("plane.glb")),t=(0,s.F)(i.ObjectLoader,(0,a.d)("plane-light.json")),f=n.scene.getObjectByName("Plane_6_update"),{mixer:p,clips:l}=(0,c.f)(n.animations,e);return(0,s.C)((()=>{n.materials["Tapestry WebGL"].map.offset.y+=.018,f.position.x=.45,f.position.y=7.5,p.clipAction(l[0]).play()})),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("primitive",{ref:e,scale:1.3,position:[0,-7,0],object:n.scene}),(0,u.jsx)("primitive",{object:t})]})}}}]);
//# sourceMappingURL=158.comparison-self-serve.js.map