Created
September 11, 2018 14:59
-
-
Save snowleo208/2d10f5cb35ac48ef36c6788de5153152 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ease in function from https://github.com/component/ease/blob/master/index.js | |
const outQuad = function(n){ | |
return n * (2 - n); | |
}; | |
let easeInPercentage = +(outQuad(progress)).toFixed(2); | |
pos = (target === 0)? (firstPos - (firstPos * easeInPercentage)) : (firstPos + (target * easeInPercentage)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment