-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tweening function #1198
base: main
Are you sure you want to change the base?
Tweening function #1198
Conversation
btw, I also thought about adding another property to (key) frames holding, for example, a bezier curve's control points, but wasn't happy with the chance of that being too ambiguous. In another project (w/ SpriteKit) I ended up having a JazzHands-like solution with animation-type specific (key) frames, also reducing both memory usage and allocation time (there were a lot of frames). |
@felixjendrusch We just released JazzHands 2.0, which has an updated architecture that allows for much easier creation of custom animations. Check out The new JazzHands also has much lower memory usage an allocation time as it lazily creates the interpolated values instead of pre-generating the animation timeline array. This looks awesome but I'm worried it's a bit complex for including in the main project- does it looks like the new ability to custom animations combined with the awesome Easing Functions you added would allow you to implement this as a custom animation type in your project? It looks like you could use an Let me know if I misunderstood what this pull request is intended for! |
@lauraskelton great news! I guess a custom animation would probably work somehow. However, as described, the initial idea was to provide quadratic and cubic bezier curve animations of the frame's origin, i.e., moving a view along a bezier curve instead of a line. It really is about the interpolation, or tweening, not the easing. After an initial look it seems like this could be realized by providing a custom |
@felixjendrusch Ah, I see! Animating the path it's following. Very cool! What if, to make it so that other types of animations could use this kind of bezier curve tweening too (like Then to use that to animate your frame, you'd just add an |
@felixjendrusch I'm adding support for all types of So, the good news is, you should be able to use the built-in tweening of |
@lauraskelton regarding |
@lauraskelton, The |
@revolter This might be irrelevant with the current project, but here's the link. |
So, should we create our own animations or make PRs with them if they're general? Like the font size of a label for example. |
@revolter Well, this project is informally deprecated, so I'd encourage forks! |
@NightlyNexus Is it replaced by anything else? |
The initial idea was to provide quadratic and cubic bezier curve animations of the frame's origin. I'm not sure this is a good way, but it's at least a very flexible one. Basically, all frame tweening is proxied through a tweening function. For any two consecutive key frames
A
andB
,A
's tweening function is called to generate the requested frame.Besides the default tweening function, which calls
-[IFTTTAnimation frameForTime:startKeyFrame:endKeyFrame:]
, functions for the mentioned quadratic and cubic bezier curve animations of the frame's origin are provided.