You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am calling useSpring with transform: "rotate(...)" where the from and to transforms are both valid, but the resulting transform that react-spring gives is rotate(0.566259767453662rotate(, , ), 2rotate(, , ), 20rotate(, , )), which is an invalid value that fails to render properly.
This HTML file draws a little speedometer needle and animates it from facing left to facing right. But when it gets to facing straight up, the animation stalls and only recovers once it's no longer animating at all:
You can set USE_SPRING = false to always use the "latest" transform value, which moves properly. This demonstrates that it's not an issue with the input that I'm passing to useSpring.
Tested in Firefox 130 and Chrome 128 on macOS.
Expected Behaviour
The needle should animate smoothly without crashing in the middle.
Which react-spring target are you using?
@react-spring/web
@react-spring/three
@react-spring/native
@react-spring/konva
@react-spring/zdog
What version of react-spring are you using?
@react-spring/[email protected]
What's Wrong?
I am calling
useSpring
withtransform: "rotate(...)"
where thefrom
andto
transforms are both valid, but the resulting transform that react-spring gives isrotate(0.566259767453662rotate(, , ), 2rotate(, , ), 20rotate(, , ))
, which is an invalid value that fails to render properly.To Reproduce
Download this HTML file and open it in your browser: https://gist.github.com/wchargin/0a49246fcb9792904878013c53987d1f
You'll see the following:
springbrokenff.mov
This HTML file draws a little speedometer needle and animates it from facing left to facing right. But when it gets to facing straight up, the animation stalls and only recovers once it's no longer animating at all:
You can set
USE_SPRING = false
to always use the "latest" transform value, which moves properly. This demonstrates that it's not an issue with the input that I'm passing touseSpring
.Tested in Firefox 130 and Chrome 128 on macOS.
Expected Behaviour
The needle should animate smoothly without crashing in the middle.
Link to repo
https://gist.github.com/wchargin/0a49246fcb9792904878013c53987d1f
The text was updated successfully, but these errors were encountered: