Jump to content
Search Community

Lefthandmedia

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by Lefthandmedia

  1. Hi,

    I'm struggeling with the new scrolltrigger. I have a div with an SVG map in it. Upon scrolling I pin the container.

    Now when i scroll 3 section DIV's pass by and i want upon entering of each section to tween the #map to a specific point. That all seems to work.

    When i start the map resets to 0,0 .... when section 2 enters the map continues to the proper coordinates. BUT when section 3 enters the map seems to reset to 0,0 first before tweening to its proper location.

    Why is it not using the current location (set by section2) as the starting point for this tween?

    I made a pen to illustrate 

     

    See the Pen abdrePP by Lefthandmedia (@Lefthandmedia) on CodePen

  2. @Carl the onComplete fires after each tweened object. I only want when ALL of them are complete

    @ZachSaucier there is no mention of onCompleteAll in the docs. and that is what i ended up using after a lot of trial and error

    the solution was

     gsap.to(this.find('.level-1'), {
          duration: .5,
          autoAlpha: 0,
          display: 'none',
          ease: "back.easeIn",
          stagger: {
            each: -0.03,
            onCompleteAll: allComplete,
            onCompleteParams: this
          }
        })

    i had the most trouble finding onCompleteParams. Probably worth mentioning in the docs

  3. Hi,

    I'm migrating some tweens from gsap2 to gsap3. i have a tween in my old code

        TweenMax.staggerTo(this.find('.level-1'), .5, {
          autoAlpha: 0, display: 'none', ease: Back.easeIn
        }, -0.03, allComplete, this);

    allComplete is a function. How would i do the oncomplete all in GSAP3?

    tnx

    RDG

     

×
×
  • Create New...