Adapting the code to work correctly with the new use of the sprite object since the revision 63 of THREE.js