https://github.com/maximilianmairinger/waapieasing
Waapi bezier-functions as css string and js function
https://github.com/maximilianmairinger/waapieasing
bezier css css-string easing function waapi
Last synced: about 1 year ago
JSON representation
Waapi bezier-functions as css string and js function
- Host: GitHub
- URL: https://github.com/maximilianmairinger/waapieasing
- Owner: maximilianMairinger
- Created: 2019-12-25T17:28:12.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-11-05T05:00:36.000Z (over 4 years ago)
- Last Synced: 2025-01-22T08:42:45.004Z (over 1 year ago)
- Topics: bezier, css, css-string, easing, function, waapi
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/waapi-easing
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Waapi easing
Waapi bezier-functions as css string and js function
## Example
### Common functions
```ts
import { Easing } from "waapi-easing"
let ease = new Easing("ease")
ease.string // "ease"
ease.function // (n: progress) => progress
```
> Note: `progress` is a number between 0 and 1.
These are all available common function:
* linear
* **ease**
* easeIn
* easeOut
* **easeInOut**
### Custom functions
```ts
let custom = new Easing(.48, .165, .325, .97)
custom.string // "cubic-bezier(.48, .165, .325, .97)"
custom.function // (n: progress) => progress
```
## Contribute
All feedback is appreciated. Create a pull request or write an issue.