Skip to content

Commit

Permalink
fix step easing by implementing jump-start method
Browse files Browse the repository at this point in the history
  • Loading branch information
mracette committed Mar 24, 2020
1 parent 4d3cae8 commit 5ea05b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5ea05b3

Please sign in to comment.