Jump to content
Search Community

jjmolnar

Premium
  • Posts

    16
  • Joined

  • Last visited

About jjmolnar

jjmolnar's Achievements

  1. Thx for the response. I am sorry, I didn t specifiy my issue more thoroughly. What you ve provided works just great for this case, thank you. But imagine we use horizontal scroll with many boxes on the far right (out of the visible window) and you want to detect when the next box is in the view. I m using onUpdate to check the position of the boxes and it can now work with onEnter as far as i know. And onUpdate, of course checks every pixel meaning i ll get that ID xxx times. I need to print the ID only once when the new box is in the view. Any idea @elegantseagulls ?
  2. Hey guys, i m trying to get non-looping value from scrolltrigger update function. The issue i have in the codepen is that it gets me the value every single scrolled pixel. Is there a way how to tell scrollTrigger to return the value only once? Like - ok you reached the section, i ll print your value once (f.e. "1") and then i stop updating until i reach other section i need value from. Any advice is much appreciated!
  3. Another way is to set the value first: gsap.set(element, {letterSpacing: 0}) and then you can animate it with with "gsap.to" method
  4. Hey guys, i need a little help with this one. I have multiple elements with the same class on the page. And i want to animate on the one that is entering the viewport. I thought that scrollTrigger only takes the element in the viewport and animate that exact one. Pls advice. Many thanks
  5. Yeah i will have to go with scrollTrigger scroll proxy instead. Thank you guys for your help. Much appreciated
  6. Here is the quick codepen. It seems that easings do not work properly inside raf function: https://codepen.io/Buzzworthy/pen/JjbJzVq?editors=1010
  7. Thank you, i ll add it to the codepen soon.
  8. Thank you @ZachSaucier i ll try this and let you know.
  9. I want to measure the distances from the top of my viiewport and then trigger animations. I use baptiste briel smoothscroll plugin and raf is the only method (that i know) thanks to which I can listen to scrolled distances.
  10. every animation looks almost the same inside the raf no matter if i have elastic, bounce, power. It seems like it s calling the animation 60x a second which makes it stuck. I m thinking of getting the value of raf, print it outside of the raf and use the magic there. Or you think there is any other workaround using it inside?
  11. Hmm I have these. I use it inside the requestAnimationFrame, where i check the distance of the nav from top (bc i have smoothscroll). When i put it outside requestAnimationFrame, it works perfectly. Is there a way of how to make it work inside the raf function? At least i know the issue now. Thanks in advance @tailbreezy
  12. Tailbreezy, i probably do not describe my issue correctly. it works in your pen, it works in my pen, but when i copy paste all this to my project, none of the easing work as expected. Is there any rule how to use this in my wrapped js functions?
  13. Thx for the answer but in my project as i mentioned, no other easing work then just power0 - power4. If i use custom ease, or elastic, or any other it just animate in a default way. Is there something obvious that i miss? Attaching an example of how do i call it. The whole gsap works flawlessly and i use it for all my animations, but i struggle with this issue to change the easing to a custom one.
×
×
  • Create New...