schteppe/cannon.js — pull request #51 by airbaggins (2013-02-20 22:17:00+00:00)
Title: Particle inheritance, rays/bounding-spheres, sleeping objects dying

Hi.

Here's a few changes I've made while solving a couple of problems.

I made the inheritance of RigidBody -> Particle more consistent with everything else.

I found objects were sleeping and never waking up (I changed a small clause from ==1 to >0 to cover being asleep).

Also, using the Ray collider, it was trying to use boundingSphereRadius as a function, so I changed it to use getBoundingSphereRadius() as a function that automatically updates the boundingSphereRadius if it needs to. I'm not sure if this is a style that you want to go with, but I think it's quite nice to use as an application programmer, where you don't have to worry about the up-to-date-ness of properties.

:)