fogleman / ease

Easing functions in #golang.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Easing Functions in Go

Installation

go get -u github.com/fogleman/ease

Documentation

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


ease.Linear(t)

Linear


ease.InQuad(t)

InQuad

ease.InCubic(t)

InCubic

ease.InQuart(t)

InQuart

ease.InQuint(t)

InQuint

ease.InSine(t)

InSine

ease.InExpo(t)

InExpo

ease.InCirc(t)

InCirc

ease.InElastic(t)

InElastic

ease.InBack(t)

InBack

ease.InBounce(t)

InBounce


ease.OutQuad(t)

OutQuad

ease.OutCubic(t)

OutCubic

ease.OutQuart(t)

OutQuart

ease.OutQuint(t)

OutQuint

ease.OutSine(t)

OutSine

ease.OutExpo(t)

OutExpo

ease.OutCirc(t)

OutCirc

ease.OutElastic(t)

OutElastic

ease.OutBack(t)

OutBack

ease.OutBounce(t)

OutBounce


ease.InOutQuad(t)

InOutQuad

ease.InOutCubic(t)

InOutCubic

ease.InOutQuart(t)

InOutQuart

ease.InOutQuint(t)

InOutQuint

ease.InOutSine(t)

InOutSine

ease.InOutExpo(t)

InOutExpo

ease.InOutCirc(t)

InOutCirc

ease.InOutElastic(t)

InOutElastic

ease.InOutBack(t)

InOutBack

ease.InOutBounce(t)

InOutBounce

About

Easing functions in #golang.

License:MIT License


Languages

Language:Go 83.0%Language:Shell 17.0%