In the following usage example, I am trying to animate lineWidth SKShapeNode.
SKEase is part of the great SpriteKitEasing github repo from Craig Grummitt.
One of his tools is the Float change action, which seems to change the value of the float over time.
However, I cannot figure out how to use it. Xcode provides the following input recommendations:
let lineWeight = SKEase.createFloatTween(<start: CGFloat, end: CGFloat, time: TimeInterval, easingFunction: AHEasingFunction, setterBlock: ((SKNode, CGFloat) -> Void))
With other SKEase actions from this library, Xcode really helps with the ease of typing and helps you figure out what to type.
With this, I have no idea what options are available for AHEasingFunctions ... which I can probably find.
But I absolutely do not know what and how to use the final part, setterBlock seems to expect a function that takes a couple of parameters that are not related to activity. Xcode does not accept SKShapeNodes or SKSpriteNodes here, only SKNode, but I cannot go beyond that.
Here's how his docs describe for SKEase:

source
share