updated threejs version and implemented getDirection function.