mrdoob/three.js — pull request #4815 by erichlof (2014-05-14 05:40:37+00:00)
Title: Added method Ray.intersectBoundingSphere() / also 3 minor semicolon additions

As requested in #4801, I have implemented a Ray.intersectBoundingSphere( mesh, optionalTarget ) method to Ray.js

This method takes a three.js meshObject and optionalTarget as parameters. It will check 'this.Ray' against the bounding sphere of the mesh object that you supply it. If there is no intersection, it will return 'null'.
If there is an intersection, it will return a THREE.Vector3() with the x,y, and z coordinates of the intersection location at the first point of entry on the front of the bounding sphere. The hit location will always be located somewhere on the mesh's bounding sphere.