Robert Penner's handy easing equations for bash
Check the examples directory in this repository.
svgCheatSheet.sh
- script to generate a cheatsheet as svg (the one you see below)ascii-graphs.sh
- script to plot character-based easing-graphs to terminal
#!/bin/bash
#include easing-functions
source easing.sh
quad_easeIn $time $begin $change $duration
quad_easeOut $time $begin $change $duration
quad_easeInOut $time $begin $change $duration
...
#to ease the x-value of something,
#to make it move from x=50 to x= 250 in 100 steps
#you would write something like:
for i in {0..100}
do
x=`circ_easeOut $i 50 200 100`
#draw
done
...
Nothing any unix-like system (UNIX / GNU/Linux / OS X) shouldn't come with
bash
- http://www.gnu.org/software/bash/bc
- http://en.wikipedia.org/wiki/Bc_(programming_language)
Explicitly tested on GNU/Linux (Ubuntu 14.04 LTS/Debian 7.4) and OS X (10.6.2/10.8.5)
This SVG-Cheatsheet was generated with svgCheatSheet.sh
in the examples directory