lubuntu.me/plugins/revslider/public/assets/js/extensions/revolution.extension.slideanims.min.js

8 lines
22 KiB
JavaScript
Raw Normal View History

2016-11-28 21:52:15 -08:00
/************************************************
* REVOLUTION 5.0 EXTENSION - SLIDE ANIMATIONS
* @version: 1.0.0 (08.07.2015)
* @requires jquery.themepunch.revolution.js
* @author ThemePunch
************************************************/
!function(){var t=jQuery.fn.revolution;jQuery.extend(!0,t,{animateSlide:function(t,e,o,a,n,r,s,l,d){return i(t,e,o,a,n,r,s,l,d)}});var e=function(e,o,a,i){var n=e,r=n.find(".defaultimg"),s=n.data("zoomstart"),l=n.data("rotationstart");void 0!=r.data("currotate")&&(l=r.data("currotate")),void 0!=r.data("curscale")&&"box"==i?s=100*r.data("curscale"):void 0!=r.data("curscale")&&(s=r.data("curscale")),t.slotSize(r,o);var d=r.attr("src"),h=r.css("backgroundColor"),c=o.width,f=o.height,p=r.data("fxof"),u=0;"on"==o.autoHeight&&(f=o.c.height()),void 0==p&&(p=0);var g=0,v=r.data("bgfit"),w=r.data("bgrepeat"),m=r.data("bgposition");switch(void 0==v&&(v="cover"),void 0==w&&(w="no-repeat"),void 0==m&&(m="center center"),i){case"box":var y=0,x=0,T=0;if(y=o.sloth>o.slotw?o.sloth:o.slotw,!a)var g=0-y;o.slotw=y,o.sloth=y;for(var x=0,T=0,z=0;z<o.slots;z++){T=0;for(var b=0;b<o.slots;b++)n.append('<div class="slot" style="position:absolute;top:'+(u+T)+"px;left:"+(p+x)+"px;width:"+y+"px;height:"+y+'px;overflow:hidden;"><div class="slotslide" data-x="'+x+'" data-y="'+T+'" style="position:absolute;top:0px;left:0px;width:'+y+"px;height:"+y+'px;overflow:hidden;"><div style="position:absolute;top:'+(0-T)+"px;left:"+(0-x)+"px;width:"+c+"px;height:"+f+"px;background-color:"+h+";background-image:url("+d+");background-repeat:"+w+";background-size:"+v+";background-position:"+m+';"></div></div></div>'),T+=y,void 0!=s&&void 0!=l&&punchgs.TweenLite.set(n.find(".slot").last(),{rotationZ:l});x+=y}break;case"vertical":case"horizontal":if("horizontal"==i){if(!a)var g=0-o.slotw;for(var b=0;b<o.slots;b++)n.append('<div class="slot" style="position:absolute;top:'+(0+u)+"px;left:"+(p+b*o.slotw)+"px;overflow:hidden;width:"+(o.slotw+.6)+"px;height:"+f+'px"><div class="slotslide" style="position:absolute;top:0px;left:'+g+"px;width:"+(o.slotw+.6)+"px;height:"+f+'px;overflow:hidden;"><div style="background-color:'+h+";position:absolute;top:0px;left:"+(0-b*o.slotw)+"px;width:"+c+"px;height:"+f+"px;background-image:url("+d+");background-repeat:"+w+";background-size:"+v+";background-position:"+m+';"></div></div></div>'),void 0!=s&&void 0!=l&&punchgs.TweenLite.set(n.find(".slot").last(),{rotationZ:l})}else{if(!a)var g=0-o.sloth;for(var b=0;b<o.slots+2;b++)n.append('<div class="slot" style="position:absolute;top:'+(u+b*o.sloth)+"px;left:"+p+"px;overflow:hidden;width:"+c+"px;height:"+o.sloth+'px"><div class="slotslide" style="position:absolute;top:'+g+"px;left:0px;width:"+c+"px;height:"+o.sloth+'px;overflow:hidden;"><div style="background-color:'+h+";position:absolute;top:"+(0-b*o.sloth)+"px;left:0px;width:"+c+"px;height:"+f+"px;background-image:url("+d+");background-repeat:"+w+";background-size:"+v+";background-position:"+m+';"></div></div></div>'),void 0!=s&&void 0!=l&&punchgs.TweenLite.set(n.find(".slot").last(),{rotationZ:l})}}},o=function(t,e,o,a,i){function n(){jQuery.each(x,function(t,e){(e[0]==o||e[8]==o)&&(v=e[1],w=e[2],m=y),y+=1})}var r=punchgs.Power1.easeIn,s=punchgs.Power1.easeOut,l=punchgs.Power1.easeInOut,d=punchgs.Power2.easeIn,h=punchgs.Power2.easeOut,c=punchgs.Power2.easeInOut,f=(punchgs.Power3.easeIn,punchgs.Power3.easeOut),p=punchgs.Power3.easeInOut,u=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],g=[16,17,18,19,20,21,22,23,24,25,27],v=0,w=1,m=0,y=0,x=(new Array,[["boxslide",0,1,10,0,"box",!1,null,0,s,s,500,6],["boxfade",1,0,10,0,"box",!1,null,1,l,l,700,5],["slotslide-horizontal",2,0,0,200,"horizontal",!0,!1,2,c,c,700,3],["slotslide-vertical",3,0,0,200,"vertical",!0,!1,3,c,c,700,3],["curtain-1",4,3,0,0,"horizontal",!0,!0,4,s,s,300,5],["curtain-2",5,3,0,0,"horizontal",!0,!0,5,s,s,300,5],["curtain-3",6,3,25,0,"horizontal",!0,!0,6,s,s,300,5],["slotzoom-horizontal",7,0,0,400,"horizontal",!0,!0,7,s,s,300,7],["slotzoom-vertical",8,0,0,0,"vertical",!0,!0,8,h,h,500,8],["slotfade-horizontal",9,0,0,500,"horizontal",!0,null,9,h,h,500,25],["slotfade-vertical",10,0,0,500,"vertical",!0,null,10,h,h,500,25],["fade",11,0,1,300,"horizontal",!0,null,11,c,c,1e3,1],["slideleft",12,0,1,0,"horizontal",!0,!0,12,p,p,1e3,1],["slide