Skip to content

armgit / anime

Public Imported from GitHub
0

JavaScript animation engine

add easeOutIn easing functions

Julian Garnier698f5f66f424
diff --git a/anime.js b/anime.js
index c89c69af..7de6abf0 100644
--- a/anime.js
+++ b/anime.js
@@ -93,6 +93,7 @@
eases['easeIn' + name] = easeIn;
eases['easeOut' + name] = function(t, m) { return 1 - easeIn(1 - t, m); };
eases['easeInOut' + name] = function(t, m) { return t < 0.5 ? easeIn(t * 2, m) / 2 : 1 - easeIn(t * -2 + 2, m) / 2; };
+ eases['easeOutIn' + name] = function(t, m) { return t < 0.5 ? (1 - easeIn(1 - 2 * t, m)) / 2 : (easeIn(t * 2 - 1, m) + 1) / 2; };
});
eases.linear = function(t) { return t; };
return eases;