Skip to content

Instantly share code, notes, and snippets.

View luke-rmaki's full-sized avatar
🏠
Working from home

Luke luke-rmaki

🏠
Working from home
View GitHub Profile
@luke-rmaki
luke-rmaki / easing.js
Created January 2, 2020 09:49 — forked from gre/easing.js
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity