Jonas
Jonas
Aug 28, 2017 · 1 min read

Very nice post, thank you :)
I have been using this pattern ever since you published a gist around it. I believe I saw you used Object.defineProperty in some previous examples of this code to set temporary variables like time, animations etc. Was there a particular reason for that?

How would you go around chaining animations here? My solution was to call the next animate function after elapsed > total time, but I found that a bit hard to maintain especially as complexity grows.

Thanks again :)

)

    Jonas

    Written by

    Jonas

    Currently front-end @Algolia. All things CSS, JS and perf. Always looking for perf issues and building amazing interaction animations.