Skip to content

armgit / anime

Public Imported from GitHub
0

JavaScript animation engine

fix step easing by implementing jump-start method

Mark Racette5ea05b39a812
diff --git a/src/index.js b/src/index.js
index 5249dcf5..092d29d1 100644
--- a/src/index.js
+++ b/src/index.js
@@ -123,7 +123,7 @@ function spring(string, duration) {
// Basic steps easing implementation https://developer.mozilla.org/fr/docs/Web/CSS/transition-timing-function
function steps(steps = 10) {
- return t => Math.round(t * steps) * (1 / steps);
+ return t => Math.ceil(t * steps) * (1 / steps);
}
// BezierEasing https://github.com/gre/bezier-easing