Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fogleman/ease
Easing functions in #golang.
https://github.com/fogleman/ease
animation ease easing-functions golang
Last synced: about 3 hours ago
JSON representation
Easing functions in #golang.
- Host: GitHub
- URL: https://github.com/fogleman/ease
- Owner: fogleman
- License: mit
- Created: 2017-02-27T02:14:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-03-01T02:50:50.000Z (over 7 years ago)
- Last Synced: 2024-06-18T15:41:34.990Z (5 months ago)
- Topics: animation, ease, easing-functions, golang
- Language: Go
- Size: 5.86 KB
- Stars: 88
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Easing Functions in Go
### Installation
go get -u github.com/fogleman/ease
### Documentation
[https://godoc.org/github.com/fogleman/ease](https://godoc.org/github.com/fogleman/ease)
### Usage
All easing functions take a `float64` and return a `float64`. The input should be between 0 and 1, inclusive.
t = ease.OutElastic(t)
Some easing functions have extra parameters, like `period`. Here is an example:var f ease.Function
f = ease.OutElasticFunction(0.5)
t = f(t)
Or, simply...t = ease.OutElasticFunction(0.5)(t)
---
![Montage](https://www.michaelfogleman.com/static/ease/montage.png)
---
### ease.Linear(t)
![Linear](https://www.michaelfogleman.com/static/ease/Linear.gif)---
### ease.InQuad(t)
![InQuad](https://www.michaelfogleman.com/static/ease/InQuad.gif)### ease.InCubic(t)
![InCubic](https://www.michaelfogleman.com/static/ease/InCubic.gif)### ease.InQuart(t)
![InQuart](https://www.michaelfogleman.com/static/ease/InQuart.gif)### ease.InQuint(t)
![InQuint](https://www.michaelfogleman.com/static/ease/InQuint.gif)### ease.InSine(t)
![InSine](https://www.michaelfogleman.com/static/ease/InSine.gif)### ease.InExpo(t)
![InExpo](https://www.michaelfogleman.com/static/ease/InExpo.gif)### ease.InCirc(t)
![InCirc](https://www.michaelfogleman.com/static/ease/InCirc.gif)### ease.InElastic(t)
![InElastic](https://www.michaelfogleman.com/static/ease/InElastic.gif)### ease.InBack(t)
![InBack](https://www.michaelfogleman.com/static/ease/InBack.gif)### ease.InBounce(t)
![InBounce](https://www.michaelfogleman.com/static/ease/InBounce.gif)---
### ease.OutQuad(t)
![OutQuad](https://www.michaelfogleman.com/static/ease/OutQuad.gif)### ease.OutCubic(t)
![OutCubic](https://www.michaelfogleman.com/static/ease/OutCubic.gif)### ease.OutQuart(t)
![OutQuart](https://www.michaelfogleman.com/static/ease/OutQuart.gif)### ease.OutQuint(t)
![OutQuint](https://www.michaelfogleman.com/static/ease/OutQuint.gif)### ease.OutSine(t)
![OutSine](https://www.michaelfogleman.com/static/ease/OutSine.gif)### ease.OutExpo(t)
![OutExpo](https://www.michaelfogleman.com/static/ease/OutExpo.gif)### ease.OutCirc(t)
![OutCirc](https://www.michaelfogleman.com/static/ease/OutCirc.gif)### ease.OutElastic(t)
![OutElastic](https://www.michaelfogleman.com/static/ease/OutElastic.gif)### ease.OutBack(t)
![OutBack](https://www.michaelfogleman.com/static/ease/OutBack.gif)### ease.OutBounce(t)
![OutBounce](https://www.michaelfogleman.com/static/ease/OutBounce.gif)---
### ease.InOutQuad(t)
![InOutQuad](https://www.michaelfogleman.com/static/ease/InOutQuad.gif)### ease.InOutCubic(t)
![InOutCubic](https://www.michaelfogleman.com/static/ease/InOutCubic.gif)### ease.InOutQuart(t)
![InOutQuart](https://www.michaelfogleman.com/static/ease/InOutQuart.gif)### ease.InOutQuint(t)
![InOutQuint](https://www.michaelfogleman.com/static/ease/InOutQuint.gif)### ease.InOutSine(t)
![InOutSine](https://www.michaelfogleman.com/static/ease/InOutSine.gif)### ease.InOutExpo(t)
![InOutExpo](https://www.michaelfogleman.com/static/ease/InOutExpo.gif)### ease.InOutCirc(t)
![InOutCirc](https://www.michaelfogleman.com/static/ease/InOutCirc.gif)### ease.InOutElastic(t)
![InOutElastic](https://www.michaelfogleman.com/static/ease/InOutElastic.gif)### ease.InOutBack(t)
![InOutBack](https://www.michaelfogleman.com/static/ease/InOutBack.gif)### ease.InOutBounce(t)
![InOutBounce](https://www.michaelfogleman.com/static/ease/InOutBounce.gif)