Jump to content
Search Community

Vilas

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Vilas's Achievements

  1. This is awesome! Thank you so much! So using the .call function injects the callback into the timeline and runs is every time the animation plays? but with updated parameters? That seems super useful!
  2. Hi guys, I have a gsap timeline which animates an svg circle. (Scale and color). What I'm trying to achieve is to pass a dynamic color when clicking different buttons, for example: buttonA.addEventListener('click', (e)=>{runAnimation(DYNAMIC_VALUE)}); and then use that value here: tl.to(circles, { stagger:{ each: 0.05}, ease: "none", fill: `#${DYNAMIC_VALUE}` }) It seems that the dynamic value is always using the initial value but can't be changed later. Any idea on how to bypass this issue? Edit: seems that using a function + tl.invalidate() works, however, spam clicking the button seems to break the animation. Any ideas? Thank you in advance!
×
×
  • Create New...