Changed to use a simpler curve interpolate method - #597
Open
wmerrifield wants to merge 2 commits into
Open
wmerrifield wants to merge 2 commits into
wmerrifield wants to merge 2 commits into
Conversation
wmerrifield
force-pushed
the
curve_interpolation
branch
from
April 7, 2026 15:56
1ef9d94 to
5cb5eac
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a PR to add a simpler simpler
.curve()function, rather than having to do a lot of boilerplate with implementing a full.handler()functions when doing transitions. i.e. you can just have functions like this:in your local app code, which simply convert a 0-1 value of "fraction through the animation" into an output value which varies from 0 (i.e. the start value) to 1 (i.e. the end value), and the intermediate values are simply lerped using what amounts to the existing code.
The changed API is an additional
.curveproperty on theClay_TransitionElementConfigstructure. This is in addition to the old.handlercallback, but either one or the other must be specified for the animation to function.so you can still do
But if you want a "smoothstep" animation (or springy animation), instead of having to copy a ~50 line function each time, you can just write a one-line function (as shown above), and insert that.