This is a javascript implementation of Mingo's Restrictive Precise Angle Shadowcasting algorithm. This algorithm can be used to calculate field of vision in 2d games. It is particularily useful for roguelikes, dugenon crawlers and similar.
Actual algorithm code is a port Python version by Dominik Marczuk:
https://github.com/initrl/MRPAS-Python
Which is itself a port of PHP version, which I am unable to locate at the moment.
An explanation of the algorithm:
http://roguebasin.roguelikedevelopment.org/index.php?title=Restrictive_Precise_Angle_Shadowcasting
http://domasx2.github.com/mrpas-js/
Public Domain?