Jump to content
Search Community

KDetected

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by KDetected

  1. 10 hours ago, GreenSock said:

    Does that clear things up?

    It is, thanks so much!!

     

    So if I understood correctly, scrollTrigger should be defined in the timeline (gsap.timeline({scrollTrigger:...})) either it should be just gsap.to({scrollTrigger:..}) 

  2. 13 hours ago, OSUblake said:

    I'm not sure what you mean by this. Can you explain what you are trying to accomplish?

     

    Sorry, I mean, when using scrollTrigger, I want the animation to run only after page is scrolled to it. And it works fine when duration is set to almost zero small value (like, 0.001).

    But if I set the duration to 0, it runs immediately after the page loads like there's no scrollTrigger condition at all

  3. Hi, guys, many thanks for the such amazing tool!

     

    I'm trying to figure out how to work with gsap ScrollTrigger, and couldn't find an answer for couple things:

     

    1. When I'm using scrollTrigger and set duration to zero (0), the animation runs immediately when the page loads. However, if I change duration to any positive value (1), it works as expected. Why's that happening? I can set duration to 0.0001 for example, which works well, but I want to understand :)

    demo: 

    (On the demo, the square should be green and half-transparent from the initial)

     

    2. On the second demo, the animation plays well for the first time, however if I scroll bottom and back, next changes happens immediately with blink (I tried to set 'once' param to 'true' but it didn't help). Why's that and what's the correct way to achieve animation transition for the second run?

     

    Thanks in advance!

    See the Pen RwLBRaR by KDetected (@KDetected) on CodePen

×
×
  • Create New...