Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

nico fonseca last won the day on September 10

nico fonseca had the most liked content!

nico fonseca

  • Posts

  • Joined

  • Last visited

  • Days Won


nico fonseca last won the day on September 10

nico fonseca had the most liked content!


Profile Information

  • Gender
  • Location
    Madrid - Espaรฑa

Recent Profile Visitors

523 profile views

nico fonseca's Achievements

  1. @jeanettable ScrollTrigger in your timeline works well. Your issue is because your css, as you have all your elements with position:absolute , I set a height on your #intro and everything works well ๐ŸŽ‰ https://codepen.io/nicofonseca/pen/ab0c7d748ae152d129527fa5d1b0e825
  2. Hey @NickWoodward. This seems like a browser render issue. You can try adding a higher z-index in the pseudo element or adding a translate3d(0,0,0) / translate3d (0,0,1px) ๐Ÿ™‚
  3. Remove the rotationX:180 and set rotationY:180 gsap.set(".qf-back", { rotationY: 180 }); https://codepen.io/nicofonseca/pen/d545b63056a5335bae9abe60660b0c46?editors=1010
  4. Hi @alexe100dra , welcome to the forum! ๐Ÿ’š The correct way to reverse a timeline is like you are doing it. Yes, you can do the code "more efficient" by using a loop for example, and checking isActive() and .reversed(): https://codepen.io/nicofonseca/pen/f2f56f3b7d0613dce23a71cc0ca7713e But this way to handle it is one way on a million, as your question is more related to JavaScript and not GSAP ๐Ÿ˜› Btw, to check if anywhere on the screen was clicked you can do it like this: document.addEventListener("click", yourFunction); Happy tween! ๐Ÿ˜Š
  5. Hey @Haider Amin , your issue is because you are using "0" in position parameters so the animations are overlapping. https://codepen.io/nicofonseca/pen/4e5af64590a44ae227de9b2943b6cde0?editors=0010 If you have a lot of animations, it is better to use labels or different timelines to keep your animations encapsulated and separated. Using labels: https://codepen.io/nicofonseca/pen/d6779e2b71e30a654806fd1378f5fad6?editors=1010 Using different timelines: https://codepen.io/nicofonseca/pen/6c5b9606c52391c02e25d27ece652f84?editors=1010 Other comments: - Don't use querySelectorAll every time as it already returns all the children. const pie_1 = pie_chart.querySelectorAll(".pie_chart")[0]; const pie_2 = pie_chart.querySelectorAll(".pie_chart")[1]; const pie_3 = pie_chart.querySelectorAll(".pie_chart")[2]; const pie_4 = pie_chart.querySelectorAll(".pie_chart")[3]; const pie_5 = pie_chart.querySelectorAll(".pie_chart")[4]; Instead, you can do something like this: const pies = pie_chart.querySelectorAll(".pie_chart"); const pie_1 = pies[0]; const pie_2 = pies[1]; // Or use toArray gsap method const pies = gsap.utils.toArray(".pie_chart"); const pie_1 = pies[0]; const pie_2 = pies[1]; - Don't animate a property when the final value is equal to your previous animation, for example: tl.from(pie_1, { opacity: 0, scale: 0, }); tl.to( pie_1, { opacity: 1, //this is unnecessary because the previous animation animate opacity to 1 duration: 0.5, } )
  6. Hey @PG1 you can use .timeScale() method to change the velocity of your timeline ๐Ÿ™‚ https://codepen.io/nicofonseca/pen/2bf967d372822e74956540bc54c5650e
  7. I think you see a different behaviour in your site/Codepen because Codepen uses an Iframe. You can check, for example, the Codepen full page vs the CodeSandbox full page (no iframe). I tested it on my iPhone and the behaviour is completely different. Making an infinite scroll on mobile it can be a very hard task, more if you use a native scroll. I made it here https://danielebuffa.me/list/ and I wanted to cry. My recommendation is to try to make your nice effect only for desktop, and on mobile remove the infinite scroll so you can save yourself from a lot of headaches.
  8. @Cassie i didn't know about this Safari bug and i don't find anything related to it, but css filter is not working on svg elements ๐Ÿ˜ฎ Safari is the new IE!!! ๐Ÿ˜‚ https://codepen.io/nicofonseca/pen/4c68be32786a888814a93cdbe34ab177
  9. Hey @Faraaz , welcome to the forum! ๐Ÿ’š Apparently this is a Safari bug. I tested it on Mac and Iphone, I don't know if your issue is happening on Android too. I added the filter in the HTML and it works well https://codepen.io/nicofonseca/pen/a74e2ca0652ab6272c02bec133ccae49 Btw, to use fromTo animation do it like this: tl.fromTo('.triangleL', 10, { attr: {points:'0,338 0,223 481,280'} }, { attr: {points:'0,398 0,163 481,280'} } ,0); instead of: tl.from('.triangleL', 10, {attr: {points:'0,338 0,223 481,280'}},0); tl.to('.triangleL', 10, {attr: {points:'0,398 0,163 481,280'}},0);
  10. Ups, sorry for that! Now is public ๐Ÿ˜… And same for me, I saw it working well on mobile.
  11. Hey @Fisher666 You have images of 4.4MB, I changed them and the transitions worked well. If you want to animate images it is recommended to optimise their weight. The overflow is preserved in the transition, the problem is that you can't see it because you set the height property with !important and you should NEVER do that on your css, even less if you need to animate that property later. ๐Ÿ™‚ https://codepen.io/nicofonseca/pen/2bc450a7d05187e2c8109438a9096b88
  12. You can add callbacks on your timeline like this: const tl = gsap.timeline({ onUpdate:..., onComplete:..., onStart:..., ... }); Or you can use eventCallback() or call() , depending on what you need.
  13. Hey @matt1 welcome to the forum! ๐Ÿ’š Here you have a thread about ScrollTrigger + sequence images ๐Ÿ™‚ My recommendation is to use jpg images instead of png and reduce their size as much as possible (you have images of 150kb)
  14. Hey @jensnielsen welcome to the forum! ๐Ÿ’š ScrollTrigger is not triggering because elements are outside the window screen, so you have two ways to handle this: 1. Adding start: "top bottom+=150" https://codepen.io/nicofonseca/pen/f181d91946646195e7439a529a233c93 2. Adding refreshInit to set Y value as zero https://codepen.io/nicofonseca/pen/9e57a43d560e98d4ae4ab0f5bcfc5a4d Another thing to keep in mind, whenever you want to handle a property with GSAP it is better to set it also there instead of CSS. Hope this helps! ๐Ÿ™‚
  15. Hey @tolka you can do something like this ๐Ÿ™‚ https://codepen.io/nicofonseca/pen/badf67592921f8951b6366ce06367181