Jump to content

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

Andrew Harris

  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Newbie

About Andrew Harris

  • Rank
  1. Awesome cheers! As a temporary workaround, as it can handle smaller numbers, you can divide the expected number by a factor (i.e. 10000) to make GSAP properly handle it, then in the "onUpdate" method undo the division. However, this adds extra calculations to the tween which is less than ideal.
  2. Hiya all! i recently tried updating my site to using GSAP v3. I have a couple transitions that relied on GSAP tweening object values, it all worked perfectly, but now GSAP is updating the object with incorrect values and ending on the wrong final value. Check out my codepen for a bare minimum reproduction of the issue. The expected end state is 10000000 but GSAP is ending the tween with 121575.2192. In some cases i've seen it end with a negative number. It seems to work perfectly fine with smaller numbers under ~100000 Anyone aware of why this is happening or a
  3. Hi Rodrigo, Thanks for the reply! Haha, I wouldn't want our lord and saviour Dan Abramov to suffer a stroke ? Sorry for not being clear, i want to have a component that displays a number value that is animated up or down whenever the value changes. My actual use case is for a pricing calculator, whereby the price will animate up and down whenever a user changes parameters on other components. So yes the object values are related to the component's state, the object is merely there so GSAP can tween the value between the previous state and current state. Does that make sense? I
  4. Hi there! I would like to add a scalar tween to a component in React using GSAP, the component is a functional component. I've whipped up a quick example of how i think that could be implemented in React using GSAP in the attached codepen. (Type in some number values into the input and watch GSAP tween the number below the input) It's a bit dirty as i need to add a global object to the window on the first mount of the component, so that GSAP has an object it can freely mutate without React resetting it on each render. Is there are better way of allowing GSAP to perfo
  5. I keep getting the error "uncaught exception: Cannot tween a null target." when hovering one of the buttons in this codepen demo i've created, the animation is applied to a pseudoelement, and it looks all correct to me. The second button in the demo works, but the first doesn't for some reason. Originally the two buttons were different, one with the styling i wanted to apply alongside the animation, but i kept getting this exception, so i chipped away at all the additional styling and animations until i was left with this bug. The markup, js and styling is practically i