craftyjs/Crafty — pull request #699 by grozen (2014-01-16 23:01:25+00:00)
Title: Fix collision order

This pull request exposes an alternative method for handling collision by binding to events that fire as collisions take place. The events in question are "HitOn" for when collisions occur and "HitOff" for when they cease.

This pull request was born as an effort to solve issue #147, which it does (as you can see in the following fiddle: http://jsfiddle.net/nm2nL/5/).

I've added some tests as well, and will more than welcome your scrutiny.