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
Easing functions are useful in animation and similar, currently as far I can tell, glm only has linear interpolation (mix, lerp) and spherical interpolation (slerp for quaternions).
Examples of the kind of things I'm talking about here.
An easy strategy would be to convert this file (it has one of the ultra liberal licenses), so that each contained function is templated and returns the result of forwarding the original return value to the corresponding linear interpolation function.
I'm happy to produce the above if you agree that it would be a useful addition.
The text was updated successfully, but these errors were encountered:
Slow evening, so I made a version that builds in Visual Studio 2013 for vec, dvec and quat types here.
If you want any refinements made, or it's worth submitting a pull request, let me know.
Thanks
Edit 3 : Having checked them all visually, backInOut was incorrect, failing to meet in the middle. I've instead replaced it's functions with the formulas from STween wiki. This has added the ability to provide an optional 'overshoot' parameter to further modify the ease function. Updated gist here .
Edit 2 : I've made the changes specified in edit 1 to the gist .
Edit 1 : Having thought more on this, two things come to mind.
The easing functions really need to also be available for float and double, this isn't available in the above implementation.
Internal of the easing quat users are more likely to desire slerp, although mix/lerp may also be desirable in some cases (I guess).
This leads to the thought that it would be better structured closer to the original file mentioned in the OP. With each function instead taking the form e.g.
Easing functions are useful in animation and similar, currently as far I can tell, glm only has linear interpolation (
mix
,lerp
) and spherical interpolation (slerp
for quaternions).Examples of the kind of things I'm talking about here.
An easy strategy would be to convert this file (it has one of the ultra liberal licenses), so that each contained function is templated and returns the result of forwarding the original return value to the corresponding linear interpolation function.
I'm happy to produce the above if you agree that it would be a useful addition.
The text was updated successfully, but these errors were encountered: