Jump to content
Search Community

ainzon

Members
  • Posts

    7
  • Joined

  • Last visited

ainzon's Achievements

  1. @mvaneijgen - thank you so much for your tips! If I see the final code it always looks so obvious...
  2. Hi, I have a question about optimizing the code I created for that animation. I use the same code 3 times to achieve what you can see in codepen. I already tried to simplify that code with a timeline with no success. The problem was that only the last circle was rotating. The goal was to start the rotations with an delay. So the second should start later than the first and so on - but I couldn´t achieve that. But with the fade it looks like it does. I´m also not sure if my startValue and endValue - variables are so smart or if there is a better way. Is there a possibility to say that the start should be at the top of the element before and the end should be at the end of the element after? Side note: I´m also not 100% happy how the circles fade in - is there a smoother way or is it just my bad timing? I should ensure that the fading is done before the user scrolls away... Still learning. Thanks for your help!
  3. Hi Rodrigo, thank you very much for your answer. I played around with your solution to understand what you where doing. So far it is clear. Just a question: The if-statement in the forEach is not really necessary - it´s just because otherwise the first index would be -1 (there is no element before the first one) which would be wrong - ist that right or do I miss a point? But thanks anyway - it works!
  4. Hi, I try to "reveal" sentences while scrolling down. That works so far and I played around with batch and timeline but I could not figure out how to "reveal only" one sentence at a time (and not two or three together). Additional idea: If a sentence is "active" - could I "pretend" a scrolling of 100px so the "active" sentence is longer "active"? Thanks for any help and Ideas...
  5. @OSUblake - thank you very much for your help. I adjusted my pen a little bit. It works now for me and I hope that I will not run into performance issues...
  6. Hi there, I just started to work with GSAP and trying to animate some texts. fade-in / fade-in-left etc. animations are working fine. Now I try to reveal hidden texts when passing the scroll point. So I use ScrollTrigger as well. I think that the major problem here is, that on initialising the code the former position of the following texts is saved so when I scroll to the first one - the other reveal as well. Is there a way to recalculate after the first action is fired? Thanks in advance! Edit: The Codepen here is not working always - but if you open it on codepen it works. I also appreciate any tipps how to optimize the gsap js-code.
×
×
  • Create New...