Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var downloadLinksVisible = false;
- var animationCompleted = false;
- $(document).ready(function() {
- $( window ).resize(function() {
- if($( window ).width() > 380 && !downloadLinksVisible && animationCompleted){
- TweenMax.to(['.download', '.OS', '.bits', 'span'], 1, {autoAlpha: 1, ease: Linear.easeNone});
- downloadLinksVisible = true;
- }
- });
- setTimeout(function()
- {
- animateLogoInitial();
- }, 500);
- function animateLogoInitial(){
- var t = new TimelineMax();
- t.to('#logo3', 3.5, {strokeDashoffset: 0, ease: Linear.easeNone})
- t.set('#text', {autoAlpha: 1})
- t.to('#gr-mask-opacity', 3, {attr: {x2:"140%", y2:"140%"}, ease: Power4.easeNone})
- setTimeout(function(){
- animatePageBody();
- }, 5700);
- }
- function animatePageBody(){
- var t = new TimelineMax();
- var windowWidth = $( window ).width();
- if(windowWidth > 380){
- t.to(['.download', '.OS', '.bits', 'span'], 1, {autoAlpha: 1, ease: Linear.easeNone})
- downloadLinksVisible = true;
- }
- t.to('.whitepaper', 1, {autoAlpha: 1, ease: Linear.easeNone})
- .to('.slack', 1 , {autoAlpha: 1})
- .fromTo(['.slackLogo'], 0.75, {y: 20, rotation: 90, }, {y: 0, autoAlpha: 1, rotation: -90, ease: Linear.easeNone, delay: -0.5})
- .to('#logo, #logo3', 1, {autoAlpha: 1, delay: 0.5})
- .to('#logo3', 1, {attr: {stroke:"transparent"}, delay: -2})
- .to(['#logo1', '#logo2'], 1, {autoAlpha: 1, delay: -1, onComplete: animateLogo})
- }
- function animateLogo(){
- animationCompleted = true;
- CSSPlugin.useSVGTransformAttr = false;
- var t = new TimelineMax({repeat:-1, yoyo:true});
- t.set(['#first', '#second', '#third', '#forth'], {x:20, y:20})
- t.fromTo('#first', 2, {autoAlpha: 0, scale: 0.90}, { scale: 1, autoAlpha: 1, transformOrigin: '50% 50%', ease: Power4.easeNone, delay: 0.3}, 0)
- t.fromTo('#second', 2, {autoAlpha: 0, scale: 0.90}, { scale: 1, autoAlpha: 1, transformOrigin: '50% 50%', ease: Power4.easeNone, delay: 0.3}, 0)
- t.fromTo('#third', 2, {autoAlpha: 0, scale: 0.90}, { scale: 1, autoAlpha: 1, transformOrigin: '50% 50%',ease: Power4.easeNone, delay: 0.3}, 0)
- t.fromTo('#forth', 2, {autoAlpha: 0, scale: 0.90}, { scale: 1, autoAlpha: 1, transformOrigin: '50% 50%', ease: Power4.easeNone, delay: 0.3}, 0)
- t.fromTo('#logo1', 2, {autoAlpha: 1}, {autoAlpha: 0, delay: 0.3},0)
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement