Implementing Friction in HTML5 Canvas | Hacker News Reader