Add more easing functions
See original GitHub issueThere are a number of ‘easing functions’ used by the animation system. At the top of _animator.py you will see the following:
EASING = {
"none": lambda x: 1.0,
"round": lambda x: 0.0 if x < 0.5 else 1.0,
"linear": lambda x: x,
"in_cubic": lambda x: x * x * x,
"in_out_cubic": lambda x: 4 * x * x * x if x < 0.5 else 1 - pow(-2 * x + 2, 3) / 2,
"out_cubic": lambda x: 1 - pow(1 - x, 3),
}
These function have been copied from https://easings.net/ and translated from Javascript to Python. I would like to add the remaining functions to the EASING dict above.
See the animation.py example as a way of testing the above functions.
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
<easing-function> - CSS: Cascading Style Sheets | MDN
The <easing-function> CSS data type denotes a mathematical function that describes the rate at which a numerical value changes.
Read more >Understanding Easing Functions For CSS Animations And ...
Easing functions can change the look and feel of an animation by affecting the rate, or speed, of an animation.
Read more >Help add new easing functions #507 - tweenjs/tween.js - GitHub
We could always use more easing functions. An easing function is single-variable function that maps values in the range [0, 1] to a...
Read more >More Easing Functions Tutorial - JavaScript 2d canvas library
This tutorial demonstrates all of the easing function sets provided by Konva,including Linear, Ease, Back, Elastic, Bounce, and Strong.
Read more >Ease-y Breezy: A Primer on Easing Functions | CSS-Tricks
The purpose of an easing function is to get non-linear values from linear value inputs.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No need for a donation! 😉
I have a Buy Me a Coffee account (associated with my blog) where people can buy me a slice of pizza, maybe I’ll move it to ko-fi…
But I do not want Will’s coffee for this contribution, and I will refund it if needed 🤣