96 ms·
This is very cool. I also just noticed a neat quirk - if you switch tabs (I'm on chrome) the animations pause but the timer to show the text keeps ticking. So a
by tterrace 14y ago
This is very cool. I also just noticed a neat quirk - if you switch tabs (I'm on chrome) the animations pause but the timer to show the text keeps ticking. So all the text bunches up at the bottom until you switch back at which point the text blob starts to fade out all together.
The page visibility api: http://www.w3.org/TR/2011/WD-page-visibility-20110602/ http://www.w3.org/TR/2011/WD-page-visibility-20110602/ might be able to help with that.
- artemave 14y agoNice one. Thanks!
- kpreid 14y agoNot a bad idea to respond to visibility, but to solve the blob problem it would be better to explicitly synchronize text creation and text position. This is basic in game/simulation programming: you don't want the rules of the game to change depending on the performance of the computer — it may be slower, but it should be internally consistent. For example, have a single, explicit 'scroll position' or 'time' variable (they're equivalent in this case), increment it on a timer, and insert new text when (time mod N) rolls over.