mrdoob/three.js — pull request #4817 by erichlof (2014-05-14 19:29:57+00:00)
Title: Added method Ray.intersectSphere(sphere) and 3 semicolon insertions to Ray.js

Changed this method to reflect the functionality of @bhouston 's original Ray.js .

Now this method looks like:
THREE.Ray.intersectSphere( sphere, optionalTarget );

It returns null if no intersection is found, and if a collision is found, it returns a THREE.Vector3( ) containing the location (x,y, and z coordinates) of the contact point in world space.

Here's a demo showing off the new feature:
http://erichlof.github.io/AsteroidPatrol3D/RayIntersectSphere.html

and the demo's source to see how it's used:
https://github.com/erichlof/AsteroidPatrol3D/blob/gh-pages/RayIntersectSphere.html

Also, 3 minor semicolon insertions were made to Ray.js