Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krasimir/easejs
Easing functions for JavaScript
https://github.com/krasimir/easejs
Last synced: about 2 months ago
JSON representation
Easing functions for JavaScript
- Host: GitHub
- URL: https://github.com/krasimir/easejs
- Owner: krasimir
- Created: 2012-10-07T04:52:46.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-10-07T07:23:34.000Z (over 12 years ago)
- Last Synced: 2024-12-22T17:46:26.484Z (2 months ago)
- Language: JavaScript
- Size: 211 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# easejs
### Robert Pener's easing functions for javascript
***
**easejs** doesn't animate. It only calculates the values necessary to make an animation. I.e. it shows you how **a** transforms to **b** by using some of the predefined mathematical methods.
***
#### Usage
var options = {
start: 0, // the initial value of the property
end: 350, // the end value of the property
steps: 20, // how many steps/keyframes will be your animation
method: "OutBack" // ease method
};
var values = ease.calculate(options);
/*
values is an array which is filled with numbers from 0 to 350. For example:
[0, 80, 149, 207, 255, 295, 325, 349, 366, 377, 383, 385, 383, 379, 374, 367, 361, 355, 351, 350]
As it is done on this page, later you can use these numbers to create an animation.
*/#### Valid ease methods
InBack, OutBack, InOutBack, OutBounce, InBounce, InOutBounce, InCirc, OutCirc, InOutCirc, In, Out, InOut, InElastic, OutElastic, InOutElastic, InExpo, OutExpo, InOutExpo, Linear, InLinear, OutLinear, InOutLinear, InQuad, OutQuad, InOutQuad, InQuart, OutQuart, InOutQuart, InQuint, OutQuint, InOutQuint, InSine, OutSine, InOutSine