How the heck?

Just getting into stumbleupon (love it) and stumbled onto this http://www.adverputt.com/

I thought it was pretty amazing. I’m wondering whether all the collision detection with the edge is actually done in a 3d space or is it all just a very clever illusion? :h: Either way, the effect is some pretty amazing physics…

What do you think guys?