Hacker News new | past | comments | ask | show | jobs | submit login

How do you learn to make these things?



This actually isn't made with D3. If you look at http://hereistoday.com/today.js, it is all done in Canvas. Their code is fairly well commented, so start by reading through that. At the same time, Google around how to use Canvas for animation.

How it works: they bind the getPosition function the mousedown event, which in turn starts the appropriate draw function. They have 19 frames, each of which has its own draw function that draws rectangles. Every 1000/FPS seconds, the the update and beginDraw functions are called, which are responsible for tween effect.


You go here: http://d3js.org/, you begin.

That's the short answer.


That was exactly my first reaction. How in the world are so many people doing so many awesome things! Where do I start?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: