If a three.js version greater than r165 then we can use the new ability to exit raycast traversal early (https://github.com/mrdoob/three.js/pull/27709) which will improve performance and allow for custom raycast functions.
Raycasting in an extreme case (close mesh, error target of 10) results in improvements from ~1.8-2.1ms to ~0.2ms for a raycast.
TODO
Add a function for retrieving whether r165 has been used.
Fix #416 Related to https://github.com/mrdoob/three.js/pull/27709
If a three.js version greater than r165 then we can use the new ability to exit raycast traversal early (https://github.com/mrdoob/three.js/pull/27709) which will improve performance and allow for custom raycast functions.
Raycasting in an extreme case (close mesh, error target of 10) results in improvements from ~1.8-2.1ms to ~0.2ms for a raycast.
TODO
cc @AlaricBaraou