This is a simple low-level raycaster written in Vanilla JavaScript using the TWGL library for WebGL. You may try it out here. I would be glad if it helps you in any way.
This is NOT a 3D game! This is the repository where I followed this great blog post by @grantshandy: https://grantshandy.github.io/raycasting/. It shows you how to ...