Comment

Comment by cjlarose

Yeah, so the application state is captured in the URL with throttling. The behavior isn't too different from Underscore/Lodash's throttle function (https://lodash.com/docs#throttle). Basically, you can click and drag the range sliders to update the visualization pretty rapidly. If I updated the URL with windows.history.pushState every time the state changed for a single keyframe, it would overload the history and be a pain to hit the "back" button. So instead, I throttle calls to pushState so it fires no more than every 500ms.

I think it might be too to do a write-up. I definitely learned a lot doing it!

parent cjlarose 11 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton