Skip to content

armgit / anime

Public Imported from GitHub
0

JavaScript animation engine

Add easeOutIn

Ryan Waldondd9130cdcbf4
diff --git a/src/index.js b/src/index.js
index 3ab5b210..8db9416d 100644
--- a/src/index.js
+++ b/src/index.js
@@ -246,6 +246,8 @@ const penner = (() => {
eases['easeOut' + name] = (a, b) => t => 1 - easeIn(a, b)(1 - t);
eases['easeInOut' + name] = (a, b) => t => t < 0.5 ? easeIn(a, b)(t * 2) / 2 :
1 - easeIn(a, b)(t * -2 + 2) / 2;
+ eases['easeOutIn' + name] = (a, b) => t => t < 0.5 ? (1 - easeIn(a, b)(1 - t * 2)) / 2 :
+ (easeIn(a, b)(t * 2 - 1) + 1) / 2;
});
return eases;