Skip to content

Instantly share code, notes, and snippets.

@yarastqt
Last active September 27, 2017 10:28
Show Gist options
  • Save yarastqt/f5d3493bfff1d6b5aa3a254a7cb346f9 to your computer and use it in GitHub Desktop.
Save yarastqt/f5d3493bfff1d6b5aa3a254a7cb346f9 to your computer and use it in GitHub Desktop.
const easing = {
easeInCubic(t) {
return t ** 3
},
easeOutCubic(t) {
return (--t) * t ** 2 + 1
},
easeInOutCubic(t) {
return t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment