The distance isn't calculated correctly, so the behavior uses byValue as the distance.
For example, say there's a node with a current scale of 1.0 - if we tried to scale it by 1.2, SpriteKit-Spring will currently scale it to 1.0 + 1.2 instead of 1.0 * 1.2, which in this case would more than double the scale instead of scaling appropariately. I put up an example app at https://github.com/noahsark769/NGSpriteKitSpringTest to demonstrate this.
The fix is to calculate the initialDistance based on multiplying it by initialValue.
Let me know if I need to do anything else to fix this bug! Thanks!
Hey! Awesome library, thanks for building it. I noticed that there's a bug with animations that use
byValue
, e.g.:The distance isn't calculated correctly, so the behavior uses
byValue
as the distance.For example, say there's a node with a current scale of 1.0 - if we tried to scale it by 1.2, SpriteKit-Spring will currently scale it to
1.0 + 1.2
instead of1.0 * 1.2
, which in this case would more than double the scale instead of scaling appropariately. I put up an example app at https://github.com/noahsark769/NGSpriteKitSpringTest to demonstrate this.The fix is to calculate the
initialDistance
based on multiplying it byinitialValue
.Let me know if I need to do anything else to fix this bug! Thanks!