Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gamestdio/easing
Collection of easing equations for JavaScript / TypeScript
https://github.com/gamestdio/easing
easing easing-equations easing-functions
Last synced: 9 days ago
JSON representation
Collection of easing equations for JavaScript / TypeScript
- Host: GitHub
- URL: https://github.com/gamestdio/easing
- Owner: gamestdio
- License: mit
- Created: 2018-05-16T16:14:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-16T17:57:33.000Z (over 6 years ago)
- Last Synced: 2024-09-23T05:18:34.013Z (about 2 months ago)
- Topics: easing, easing-equations, easing-functions
- Language: JavaScript
- Homepage: http://gamestd.io/easing
- Size: 24.4 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# @gamestdio/easing
This is a grab-bag of [Robert Penner's easing equations](http://www.robertpenner.com/easing/), most of the code from [glsl-easings](https://www.npmjs.org/package/glsl-easings). Pull requests for optimizations are welcome.
## Usage
[![NPM](https://nodei.co/npm/@gamestdio/easing.png)](https://nodei.co/npm/@gamestdio/easing/)
Full list of eases:
```js
import { backInOut } from '@gamestdio/easing';
import { backIn } from '@gamestdio/easing';
import { backOut } from '@gamestdio/easing';
import { bounceInOut } from '@gamestdio/easing';
import { bounceIn } from '@gamestdio/easing';
import { bounceOut } from '@gamestdio/easing';
import { circInOut } from '@gamestdio/easing';
import { circIn } from '@gamestdio/easing';
import { circOut } from '@gamestdio/easing';
import { cubicInOut } from '@gamestdio/easing';
import { cubicIn } from '@gamestdio/easing';
import { cubicOut } from '@gamestdio/easing';
import { elasticInOut } from '@gamestdio/easing';
import { elasticIn } from '@gamestdio/easing';
import { elasticOut } from '@gamestdio/easing';
import { expoInOut } from '@gamestdio/easing';
import { expoIn } from '@gamestdio/easing';
import { expoOut } from '@gamestdio/easing';
import { linear } from '@gamestdio/easing';
import { quadInOut } from '@gamestdio/easing';
import { quadIn } from '@gamestdio/easing';
import { quadOut } from '@gamestdio/easing';
import { quartInOut } from '@gamestdio/easing';
import { quartIn } from '@gamestdio/easing';
import { quartOut } from '@gamestdio/easing';
import { quintInOut } from '@gamestdio/easing';
import { quintIn } from '@gamestdio/easing';
import { quintOut } from '@gamestdio/easing';
import { sineInOut } from '@gamestdio/easing';
import { sineIn } from '@gamestdio/easing';
import { sineOut } from '@gamestdio/easing';
```All easing functions only remap a time value, and all have the same signature.
#### ```v = ease(t)```
Where `t` is typically a value between 0 and 1, and it returns a new float that has been eased.
## License
MIT, see [LICENSE.md](http://github.com/mattdesl/eases/blob/master/LICENSE.md) for details.