Skip to content

Latest commit

 

History

History
117 lines (65 loc) · 2.37 KB

README.md

File metadata and controls

117 lines (65 loc) · 2.37 KB

ease

Easing function macros

install

$ clib install glisy/ease  --save

usage

#include <glisy/ease.h>
...
float time = glfwGetTime();
vec3 from = {0, 0, 0};
vec3 to = {3, 3, 3};
float from.x = ease_in_cubic(time, from.x, 1, to.x);
float from.y = ease_in_cubic(time, from.y, 1, to.y);
float from.z = ease_in_cubic(time, from.z, 1, to.z);

api

ease_linear_tween(t, b, c, d)

simple linear tweening - no easing, no acceleration

ease_in_quad(t, b, c, d)

quadratic easing in - accelerating from zero velocity

ease_out_quad(t, b, c, d)

quadratic easing out - decelerating to zero velocity

ease_in_out_quad(t, b, c, d)

quadratic easing in/out - acceleration until halfway, then deceleration

ease_in_cubic(t, b, c, d)

cubic easing in - accelerating from zero velocity

ease_out_cubic(t, b, c, d)

cubic easing out - decelerating to zero velocity

ease_in_out_cubic(t, b, c, d)

cubic easing in/out - acceleration until halfway, then deceleration

ease_in_quart(t, b, c, d)

quartic easing in - accelerating from zero velocity

ease_out_quart(t, b, c, d)

quartic easing out - decelerating to zero velocity

ease_in_out_quart(t, b, c, d)

quartic easing in/out - acceleration until halfway, then deceleration

ease_in_quint(t, b, c, d)

quintic easing in - accelerating from zero velocity

ease_out_quint(t, b, c, d)

quintic easing out - decelerating to zero velocity

ease_in_out_quint(t, b, c, d)

quintic easing in/out - acceleration until halfway, then deceleration

ease_in_sine(t, b, c, d)

sinusoidal easing in - accelerating from zero velocity

ease_out_sine(t, b, c, d)

sinusoidal easing out - decelerating to zero velocity

ease_in_out_sine(t, b, c, d)

sinusoidal easing in/out - accelerating until halfway, then decelerating

ease_in_expo(t, b, c, d)

exponential easing in - accelerating from zero velocity

ease_out_expo(t, b, c, d)

exponential easing out - decelerating to zero velocity

ease_in_out_expo(t, b, c, d)

exponential easing in/out - accelerating until halfway, then decelerating

ease_in_circ(t, b, c, d)

circular easing in - accelerating from zero velocity

ease_out_circ(t, b, c, d)

circular easing out - decelerating to zero velocity

ease_in_out_circ(t, b, c, d)

circular easing in/out - acceleration until halfway, then deceleration

license

MIT