[aabb-collider] Remove boxhelper when component is removed
If 'debug' is set to true, a boxhelped is added to the scene for the element with the collider, and for elements potentially colliding with it. If the collider component is removed from the element, all those boxhelpers should be removed. This patch removes them.
Moving to work in progress, because after playing a bit with it, I'm not the patch has undesired side effects.
Removing "WIP", it seems this is ready for prime time... (side effects were from the testing code :-( ).
Oh boxHelper.dispose() is actually new from threejs r145, so this will work only on aframe master with super-three r147 or in next aframe 1.4.0. It's better to verify the function exist before calling it boxHelper.dispose && boxHelper.dispose()
I addressed my comments and created #309 Thanks @jgbarah for the initial fix.
@dmarcos you can close this one now #309 is merged. Thanks!
Closing this in favor of https://github.com/supermedium/superframe/pull/309