Such a classic! I remember writing a raycasting engine in DJGPP (GCC for DOS), when I was teenager... Fast forward 25 years and hey, it can be done in TypeScript on a $2 microcontroller ;) (though it did take some effort to get TypeScript to run fast enough...)<p><a href="https://arcade.makecode.com/14009-57824-16954-25349" rel="nofollow">https://arcade.makecode.com/14009-57824-16954-25349</a>
<a href="https://forum.makecode.com/t/3d-raycasting-in-arcade/474" rel="nofollow">https://forum.makecode.com/t/3d-raycasting-in-arcade/474</a>
My thoughts in order:<p>1. Read title
2. But why?
3. Click link
4. No <canvas> tag? Just html and react? How?
5. Open demo
6. Inspect elements
7. Oh... Gentle chuckle. But why?
8. Remembers Atwood's Law
If you find this sort of thing interesting, I implemented a "Portal" raycasting engine akin to Valves portal game. You can read more about how it works here: <a href="https://github.com/gh123man/Portal-Raycaster" rel="nofollow">https://github.com/gh123man/Portal-Raycaster</a>
Very cool. Don't take this as criticism, I am just curious, what do you get out of React with this?<p>You have written a lot of it in pure JS so I can see you're not using it as a crutch, but I am not familiar enough with React at it's edges to know why you would bring it in to the toolbelt here.
So many DOM elements, if you inspect a wall it's made from thin slices. Wonder if they could be merged to form complete 'walls' and then use gradient effect... heck, SVG may be more effective.