Re:Show HN: 3D Raycasting Engine in JavaScript
by adamredwoods on Tuesday March 31, 2020 @09:57PM
(#22744861)
I applaud the misuse of React!
We've seen a lot of raycasters, so one made with React and hooks isn't a bad thing.
Interesting code of using useRef with your state, and then useEffect to update it every render. A simple/better Redux?
One thing that surprised me about this is how fast the browser renders 320 absolutely positioned divs that are constantly updating.
But then I thought about it some more, and realized that many websites these days probably have way more DOM and DOM manipulation than that going on!