JS implementation of Spasim raycasting algorithms