craftyjs/Crafty — pull request #671 by starwed (2013-12-27 02:49:46+00:00)
Title: Adjust bounding region to include hitbox when it exists outside of the entity

Introduce a new bounding rectangle `._cbr` (collision bounding rectangle) that is guaranteed to include both the entity and it's hitbox.
When the hitbox sits inside the entity, the CBR will not be used.

Also, simplify the way `_calculateMBR` is called. A follow up patch could optimize that function for the case where no rotation exists.

This patch also adds tests and a small note to the docs that external hitboxes might have a small performance penalty.