RayCast callbacks now reset minShape

I'm not sure how to fix this issue in the TypeScript lib, but here's a fix for the JavaScript at least.