Jump to content
Search Community

Michael71 last won the day on July 24 2014

Michael71 had the most liked content!

Michael71

Members
  • Posts

    145
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by Michael71

  1. Really appreciate this detailed explanation it really helped out immensely!
    I guess the only thing that is still unclear to me is how exactly `end` works, I mean according to docs when setting the end to `bottom right` should align the end of the animation with the end of the scrollbar right? So that would make it not scroll at all (which is the requirement here), and even if I set it to 4000px (which is larger than the scrollbar) it still scrolls when the scrub reaches towards the end.
    On my example by omitting `end` the Draw SVG did draw without scrolling at the end but still unsure why this happens.

  2. Hello long time since I posted here.

     

    I'm trying to align a drawpath svg (which is working nicely with Scrolltrigger) with a simple timeline animation (the line increasing in width) but since the timeline can be larger than the viewport I thought I could add it in a container with the same width as the drawpath svg container (3000px) but they seem to have different scrollbar width and so they don't sync correctly. Any ideas are appreciated!

    See the Pen rNMxLvL by 7linternational (@7linternational) on CodePen

  3. Hello all, long time since I posted here. So its 2020 now and wanted to check if there were any plans for Flutter greensock now or near future, since Flutter is picking up very fast now.

     

    Thanks all!

  4. Yes exactly something like this.

    Can I also get the current speed? so I can gradually decrease it? 

     

    This is for a loader which I'm not sure when it will finish, so I want to keep making it go slower so it doesn't end, and when it is complete to bump it to the end.

  5. It is not extremely difficult to achieve something like this.

     

    You could try and attach some logic into the resize event.

    $(window).resize(function(){
       // resize container here
    });
    

    Then for the slider you could setup your animation to animate left/right according to the full-width of the browser. Like follows:

    // sliding right to left
    function slideNext(){
       TweenMax.to(container, 1, {marginLeft: "-="+$(window).innerWidth()});
    }
    
    // sliding left to right
    function slidePrev(){
       TweenMax.to(container, 1, {marginLeft: "+="+$(window).innerWidth()});
    }
    

    *Provided that the "containers" inside the main slider span for the full browser width.

  6. You can capture the scroll event with:

    $(window).scroll(function (e) {
    var $top = $(window).scrollTop(); // how many pixels scrolled from top
    });
    
    

     And then do some calculations and apply a tween

    TweenLite.to(".obj", 0.5,{autoAlpha:0});
    

    And the reverse of that, if you need to fade-in when the user scrolls back again.

     

    But if you are looking for some more complex animations I would suggest: http://janpaepke.github.io/ScrollMagic/

     

    Which uses GSAP at its core and gives access to many cool effects that are based on scrolling.

    • Like 1
×
×
  • Create New...