chandlerprall/Physijs — pull request #127 by Paraknight (2013-09-10 00:59:40+00:00)
Title: Ensure fidelity of "touches" arrays before dispatching collision events

This fixes the non-reciprocity issue between two objects' *._physijs.touches* arrays (see https://github.com/chandlerprall/Physijs/pull/63) as well as making sure that they are up to date **before** dispatching collision events. At the same time, the affected code has been reduced in complexity somewhat and now everything is done in a single pass (instead of additionally iterating through the "collisions" array).

The collisions array contains the objects each collider is touching as well as the objects each collidee is touching from the start, and as such, only one collision event is dispatched for every collider and collidee. Contact normals are still negated correctly thanks to the signs on normal offsets in *normal_offsets*.

Hope I didn't inadvertently screw something else up. :)