Ray casting is a popular graphic rendering techniques in the 90s, used to render semi-3D worlds in many games. These repository contain demos for the ray-casting tutorials at permadi.com.
It runs in node.js and the browser (well, sort of). In the latter case, you will need a polyfill for Promises unless you can live without support for Internet Explorer. es6-promise is a good one.