{"id":14960631,"url":"https://github.com/qwe321qwe321qwe321/unity-easinganimationcurve","last_synced_at":"2025-09-23T16:18:30.799Z","repository":{"id":48185407,"uuid":"314372337","full_name":"qwe321qwe321qwe321/Unity-EasingAnimationCurve","owner":"qwe321qwe321qwe321","description":"A simple and fast solution of converting Easing functions to UnityEngine.AnimationCurve.","archived":false,"fork":false,"pushed_at":"2020-11-19T23:22:40.000Z","size":3656,"stargazers_count":136,"open_issues_count":0,"forks_count":13,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-02T12:44:43.852Z","etag":null,"topics":["animationcurve","easing-functions","unity","unity-plugin","unity-presets"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qwe321qwe321qwe321.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-19T21:18:34.000Z","updated_at":"2025-04-21T01:14:59.000Z","dependencies_parsed_at":"2022-08-26T00:23:40.852Z","dependency_job_id":null,"html_url":"https://github.com/qwe321qwe321qwe321/Unity-EasingAnimationCurve","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/qwe321qwe321qwe321/Unity-EasingAnimationCurve","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwe321qwe321qwe321%2FUnity-EasingAnimationCurve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwe321qwe321qwe321%2FUnity-EasingAnimationCurve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwe321qwe321qwe321%2FUnity-EasingAnimationCurve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwe321qwe321qwe321%2FUnity-EasingAnimationCurve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qwe321qwe321qwe321","download_url":"https://codeload.github.com/qwe321qwe321qwe321/Unity-EasingAnimationCurve/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwe321qwe321qwe321%2FUnity-EasingAnimationCurve/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276606235,"owners_count":25672199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animationcurve","easing-functions","unity","unity-plugin","unity-presets"],"created_at":"2024-09-24T13:22:38.540Z","updated_at":"2025-09-23T16:18:30.774Z","avatar_url":"https://github.com/qwe321qwe321qwe321.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unity-EasingAnimationCurve\nEasingAnimationCurve is a simple and fast solution of converting Easing functions to UnityEngine.AnimationCurve.\n\nIt used fewer keyframes to approximate the easing functions rather than sampling points averagely as keyframes. \n\nThere are only 2 ~ 9 keyframes in a curve.\n\n* You can download the [curve presets](#animationcurve-presets) if you only need the AnimationCurve resources.\n* Main features are all in `EasingAnimationCurve.cs`, and `EasingAnimationCurveExample.cs` shows all usages of this repo.\n\n## Preview\n\n| EaseInOutBounce: 9 keyframes  | EaseInExpo: 2 keyframes  |\n|---|---|\n|  ![](Images/EaseInOutBounce.png) | ![](Images/EaseInExpo.png)  |\n\n\n| EaseInOutCubic: 3 keyframes  | EaseInOutElastic: 9 keyframes  |\n|---|---|\n|  ![](Images/EaseInOutCubic.png) | ![](Images/EaseInOutElastic.png)  |\n\nShow all comparaison of easing function(GREEN) and animation curve(RED):\n\n![](Images/EasingAnimationCurve_overview.gif)\n\n## AnimationCurve Presets\nYou can put the presets into your project without any scripts. See [EasingFunctionPresets.unitypackage](https://github.com/qwe321qwe321qwe321/Unity-EasingAnimationCurve/releases/tag/1.0.0).\n![](Images/Presets.png)\n\n## EaseElastic has an obvious error\nOnly Elastic series have larger errors with the original easing function. But it still works as elastic function with different spring arguments. So it works for me.\n\nIf you feel the error is too large, you can make precise points via `CubicBezierFitter` and replace the original bezier points in `EasingAnimationCurve`. You can open Example scene and get the usage of them from `EasingAnimationCurveExample.cs`.\n\n## Implementation\n\n### 1. Easing Function -\u003e Cubic Bezier\nI used the data in this paper [Easing Functions in the New Form Based on Bézier Curves by Dariusz Sawicki 2016](https://www.researchgate.net/publication/308007569_Easing_Functions_in_the_New_Form_Based_on_Bezier_Curves) to convert them into cubic bezier.\n\nAnd I found this thread with a solution to fitting cubic bezier by data points. \n\u003e https://stackoverflow.com/questions/5525665/smoothing-a-hand-drawn-curve\n\nIt's very helpful to make other types of curve to Bezier curve by fitting.\nSee [`CubicBezierFitter.cs`](https://github.com/qwe321qwe321qwe321/Unity-EasingAnimationCurve/blob/main/Assets/Runtime/CubicBezierFitter.cs)\n\n### 2. Cubic Bezier -\u003e Animation Curve\nSee `EasingAnimationCurve.cs`: [here](https://github.com/qwe321qwe321qwe321/Unity-EasingAnimationCurve/blob/main/Assets/Runtime/EasingAnimationCurve.cs#L480)\n\nThere are some helpful references:\n* https://answers.unity.com/questions/623318/how-to-convert-cubic-bezier-curve-into-animationcu.html\n* https://answers.unity.com/questions/464782/t-is-the-math-behind-animationcurveevaluate.html?_ga=2.199800430.1917493740.1605667091-254103663.1587534286\n* https://answers.unity.com/questions/7682/how-can-i-set-the-tangents-of-keyframes-in-an-anim.html\n* https://docs.unity3d.com/ScriptReference/Keyframe.html\n\n## Environment\nUnity 2019.4.12f1 LTS\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqwe321qwe321qwe321%2Funity-easinganimationcurve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqwe321qwe321qwe321%2Funity-easinganimationcurve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqwe321qwe321qwe321%2Funity-easinganimationcurve/lists"}