{"version":3,"file":"home-topper-logo.js","mappings":"m1BACA,IAOIA,EAAa,GAGbC,EAAW,EACXC,EAAY,GAEVC,EAAc,WAUjB,O,EAPD,SAAAA,IAAc,I,MAAAC,EAAA,M,4FAAAC,CAAA,KAAAF,G,EAAA,K,EAFF,I,MAEE,gB,wFACZG,KAAKC,KAAOD,KAAKC,KAAKC,KAAKF,MAE3BG,YAAW,WACTC,SAASC,eAAe,WAAWC,MAAMC,QAAU,EACnDC,sBAAsBV,EAAKG,KAC7B,GApBkB,IAqBpB,E,EAAC,EAAAQ,IAAA,OAAAC,MAED,SAAKC,GACHf,GAAae,EAAIhB,GAAY,QAC7BC,EAAYgB,KAAKC,IAAI,EAAGjB,GACxBD,EAAWgB,EAKXjB,GAjCc,KA8BF,EACcA,GAA0BE,EAKpDQ,SAASU,KAAKR,MAAMS,YAAY,kBAAmB,GAAFC,OAAmB,KAAbtB,EAAgB,OACvEU,SAASU,KAAKR,MAAMS,YAAY,eAAgB,GAAFC,OAAKtB,EAAU,QAC7DU,SAASU,KAAKR,MAAMS,YAAY,mBAAoB,IAAFC,OAAMtB,EAAU,QAClEc,sBAAsBR,KAAKC,KAC7B,I,gFAAC,CA3BiB,GA8BpB,W","sources":["webpack://@upstatement/harvard-law-school-wp-theme/./static/js/components/home-topper-logo.js"],"sourcesContent":["// accelleration rate for animations\nconst VEL_DELTA = 0.05;\n// initial delay before fading in (milliseconds)\nconst INITIAL_DELAY = 500;\n\n// variables for tracking animation\nlet targetPos = 0;\nlet currentVel = 0;\nlet currentPos = 50;\n\n// variables for handling fps variations\nlet lastTime = 1;\nlet timeDelta = 16;\n\nclass HomeTopperLogo {\n listeners = [];\n\n constructor() {\n this.loop = this.loop.bind(this);\n\n setTimeout(() => {\n document.getElementById('HLSLogo').style.opacity = 1;\n requestAnimationFrame(this.loop);\n }, INITIAL_DELAY);\n }\n\n loop(t) {\n timeDelta = (t - lastTime) / 16.6667;\n timeDelta = Math.min(1, timeDelta);\n lastTime = t;\n\n targetPos = 0;\n currentVel = (targetPos - currentPos) * VEL_DELTA * timeDelta;\n\n currentPos += currentVel;\n\n // set initial slide in offset, as well as counter-rotation values for inner rings\n document.body.style.setProperty('--scroll-offset', `${-currentPos * 1.5}px`);\n document.body.style.setProperty('--scroll-pos', `${currentPos}deg`);\n document.body.style.setProperty('--scroll-pos-rev', `-${currentPos}deg`);\n requestAnimationFrame(this.loop);\n }\n}\n\nexport default HomeTopperLogo;\n"],"names":["currentPos","lastTime","timeDelta","HomeTopperLogo","_this","_classCallCheck","this","loop","bind","setTimeout","document","getElementById","style","opacity","requestAnimationFrame","key","value","t","Math","min","body","setProperty","concat"],"sourceRoot":""}