Sha256: 401185f84afccfbe9d467fb883af378b69251c212767551b8ae98255ed7160b3
Contents?: true
Size: 1.09 KB
Versions: 19
Compression:
Stored size: 1.09 KB
Contents
const AnimateChart = () => { $(Site.charts.list).map((index,value) => { let tl = gsap.timeline({ repeat : -1, repeatDelay : 3 }), item = $(value).find(".block.chart-bar"), pcent = $(item).children(Site.charts.pcent).children("span"), title = $(item).find(Site.charts.title), speed = 0.2; tl .from(item,{ duration : speed * 5, stagger : speed, height : 0 },"start") .from(title,{ delay : speed * 5, duration : speed, opacity : 0 },"start") .from(title,{ delay : speed * 5, duration : speed * 4, scrambleText : { chars : Site.scramble.chars, speed : Site.scramble.speed } },"start"); pcent.map((index) => { let update = pcent[index].innerText, prev = { val : 0 }; const UpdateVal = () => { let jump = gsap.utils.snap(1,prev.val); pcent[index].innerText = jump; } tl .to(prev,{ val : update, duration : speed * 10, onUpdate : UpdateVal },"start"); }); }); }
Version data entries
19 entries across 19 versions & 1 rubygems