mirror of
https://github.com/RamonGebben/Cquence.git
synced 2026-03-10 08:51:22 +00:00
Merge branch 'master' of github.com:RamonGebben/Cquence
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Cquence.js
|
# Cquence.js
|
||||||
|
|
||||||
Cquence is a very small Javascript animator librarie developed to for banners and advertisement.
|
Cquence is a very small Javascript animation library developed for banners and advertisement.
|
||||||
|
|
||||||
[Demo](http://ramongebben.github.io/Cquence)
|
[Demo](http://ramongebben.github.io/Cquence)
|
||||||
|
|
||||||
|
|||||||
1
cquence.min.js
vendored
Normal file
1
cquence.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
function getInternetExplorerVersion(){var e=-1;if(navigator.appName=="Microsoft Internet Explorer"){var t=navigator.userAgent;var n=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(n.exec(t)!=null)e=parseFloat(RegExp.$1)}return e}var raf=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)};var elem=function(e){return document.getElementById(e)};var style=function(e,t,n){if(t==="opacity"){if(IE8){e.style["-ms-filter"]="progid:DXImageTransform.Microsoft.Alpha(Opacity="+Math.floor(n*100)+")";e.style["filter"]="alpha(opacity="+Math.floor(n*100)+")"}else{e.style[t]=n}}else{e.style[t]=n+"px"}};var combine=function(){var e=Array.prototype.slice.call(arguments,0);var t=0;for(var n=0;n<e.length;n++){t=Math.max(e[n].d,t)}return{d:t,f:function(t){for(var n=0;n<e.length;n++){var r=e[n];if(r.d>t){r.f(t)}else{if(!r.done){r.f(r.d);r.done=true}}}}}};var sequence=function(){var e=Array.prototype.slice.call(arguments,0);var t=0;for(var n=0;n<e.length;n++){t=t+e[n].d}return{d:t,f:function(t){var n=null;var r=0;for(var i=0;i<e.length;i++){var n=e[i];if(r+n.d>t){n.f(t-r);return}if(!n.done){n.f(n.d);n.done=true}r=r+n.d}}}};var animate=function(e){return function(t,n,r,i){return{d:n,f:function(s){var o=elem(t);for(var u in r){var a=r[u];var f=i[u];var l=f-a;var c=e(Math.max(s/n,0));var h=a+c*l;style(o,u,h)}}}}};var linear=animate(function(e){return e});var easeIn=animate(function(e){return Math.pow(e,5)});var easeOut=animate(function(e){return 1-Math.pow(1-e,5)});var sleep=function(e){return{d:e,f:function(e){}}};var IEVERSION=getInternetExplorerVersion();var IE8=IEVERSION===8;var IEWTF=IEVERSION<8&&IEVERSION>-1;var timeline=[];var start=+(new Date);var second=1e3;var stop=15*second;var render=null;var renderloop=function(){var e=+(new Date)-start;if(e<stop)raf(renderloop);if(render)render.f(e)}
|
||||||
Reference in New Issue
Block a user