UNPKG

odescroll

Version:

ODE Scroll is a modern and awesome animate on scroll library using CSS3

1 lines 3.8 kB
function _0x5ee5(_0x203b64,_0xc849c3){const _0xb6a091=_0xb6a0();return _0x5ee5=function(_0x5ee56c,_0x490c05){_0x5ee56c=_0x5ee56c-0x160;let _0x2df052=_0xb6a091[_0x5ee56c];return _0x2df052;},_0x5ee5(_0x203b64,_0xc849c3);}function _0xb6a0(){const _0x3c352b=['transition','animatedClassName','setAttribute','all_transition','length','transitionTimingFunction','style','easing','odescroll','36ZYTghZ','boundingClientRect','data-odescroll-easing','once','querySelectorAll','all_easing','true','2261017rIZCcX','3160014FpMlhf','3WSMCem','children','10gfhPQz','967730oBXCwz','getAttribute','312541wYeiah','now','undefined','data-odescroll','isIntersecting','data-odescroll-once','threshold','323656tRlnus','[data-odescroll-container]','2HUseTa','oneDirection','observe','data-odescroll-transition','128086TjhxuI','top','1310916pAoPro'];_0xb6a0=function(){return _0x3c352b;};return _0xb6a0();}const _0x18c39f=_0x5ee5;(function(_0x242b17,_0x133b3c){const _0x3fcbf1=_0x5ee5,_0xfe7601=_0x242b17();while(!![]){try{const _0x248f18=-parseInt(_0x3fcbf1(0x185))/0x1*(-parseInt(_0x3fcbf1(0x167))/0x2)+parseInt(_0x3fcbf1(0x180))/0x3*(parseInt(_0x3fcbf1(0x16d))/0x4)+parseInt(_0x3fcbf1(0x183))/0x5+-parseInt(_0x3fcbf1(0x17f))/0x6+parseInt(_0x3fcbf1(0x16b))/0x7+-parseInt(_0x3fcbf1(0x165))/0x8*(-parseInt(_0x3fcbf1(0x177))/0x9)+-parseInt(_0x3fcbf1(0x182))/0xa*(parseInt(_0x3fcbf1(0x17e))/0xb);if(_0x248f18===_0x133b3c)break;else _0xfe7601['push'](_0xfe7601['shift']());}catch(_0x51defd){_0xfe7601['push'](_0xfe7601['shift']());}}}(_0xb6a0,0x44c7e));function init_odescroll(_0x4c9467){const _0x2880ac=_0x5ee5,_0xb5aee9=performance[_0x2880ac(0x186)](),_0x48c9ac=_0x4c9467&&{'all_transition':_0x4c9467[_0x2880ac(0x16e)],'all_easing':_0x4c9467[_0x2880ac(0x175)],'once':_0x4c9467['once'],'oneDirection':_0x4c9467['oneDirection'],'animatedClassName':_0x4c9467['animatedClassName'],'threshold':_0x4c9467[_0x2880ac(0x164)]},_0xefa6d7=document[_0x2880ac(0x17b)](_0x2880ac(0x166));return _0xefa6d7['forEach'](_0x5db2ab=>{const _0x36f8e2=_0x2880ac,_0x4420f7=_0x5db2ab[_0x36f8e2(0x181)][0x0],_0x49a648=_0x4420f7['getAttribute'](_0x36f8e2(0x16a)),_0x1b3d07=_0x4420f7['getAttribute'](_0x36f8e2(0x179)),_0x18bd4b=_0x4420f7[_0x36f8e2(0x184)](_0x36f8e2(0x161));var _0x4da135=new IntersectionObserver(function(_0xf03b18){const _0x1b5143=_0x36f8e2,_0x1beac3=performance[_0x1b5143(0x186)]();if(_0xf03b18[0x0][_0x1b5143(0x162)]){if(_0x4c9467&&_0x48c9ac['all_transition'])_0x4420f7['style'][_0x1b5143(0x16e)]=_0x48c9ac[_0x1b5143(0x171)]+'s';if(_0x4c9467&&_0x48c9ac[_0x1b5143(0x17c)])_0x4420f7['style']['transitionTimingFunction']=_0x48c9ac[_0x1b5143(0x17c)];if(_0x49a648)_0x4420f7[_0x1b5143(0x174)][_0x1b5143(0x16e)]=_0x49a648+'s';if(_0x1b3d07)_0x4420f7[_0x1b5143(0x174)][_0x1b5143(0x173)]=_0x1b3d07;_0x4420f7[_0x1b5143(0x170)](_0x1b5143(0x161),_0x18bd4b+(_0x4c9467&&_0x48c9ac[_0x1b5143(0x16f)]?_0x48c9ac['animatedClassName']:'-active'));}else{function _0xcc96fa(){const _0xa39385=_0x1b5143,_0x478087=_0x4420f7[_0xa39385(0x184)](_0xa39385(0x163)),_0x249854=_0x478087&&_0x478087==_0xa39385(0x17d)?!![]:_0x478087=='false'?![]:null;_0x249854==null?_0x4c9467&&!_0x48c9ac[_0xa39385(0x17a)]&&_0x4420f7[_0xa39385(0x170)](_0xa39385(0x161),_0x18bd4b):!_0x249854&&_0x4420f7[_0xa39385(0x170)](_0xa39385(0x161),_0x18bd4b);}_0x48c9ac[_0x1b5143(0x168)]===!![]?_0xf03b18[0x0][_0x1b5143(0x178)][_0x1b5143(0x16c)]>0x0&&_0xcc96fa():_0xcc96fa();}},{'threshold':_0x4c9467&&_0x48c9ac[_0x36f8e2(0x164)]?_0x48c9ac['threshold']:[0.6]});_0x4da135[_0x36f8e2(0x169)](_0x5db2ab);}),!_0xefa6d7||_0xefa6d7[_0x2880ac(0x172)]<=0x0?undefined:{'run':!![],'elementsLength':_0xefa6d7[_0x2880ac(0x172)],'performance':performance['now']()-_0xb5aee9+'ms'};}const odescroll={'init':init_odescroll};typeof exports!=_0x18c39f(0x160)&&(exports[_0x18c39f(0x176)]={'init':init_odescroll});