Skip to content

Instantly share code, notes, and snippets.

View jwdunn1's full-sized avatar

James Dunn jwdunn1

View GitHub Profile
@jwdunn1
jwdunn1 / easing.js
Last active May 3, 2020 06:43 — 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: t => t,
// accelerating from zero velocity
easeInQuad: t => t*t,
// decelerating to zero velocity