Created
April 24, 2018 18:10
-
-
Save scrapcupcake/9ebb78aaa279e5897811309b59b9ebe6 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
duration = (ms, scheduler = Scheduler.animationFrame) => { | |
return msElapsed() | |
.map(ems => ems / ms) | |
.takeWhile(t => t <= 1) | |
.finally(() => 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment