4 ms·
Very cool. Don't take this as criticism, I am just curious, what do you get out of React with this? You have written a lot of it in pure JS so I can see you're
by ehnto 6y ago
Very cool. Don't take this as criticism, I am just curious, what do you get out of React with this?
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.
- runawaybottle 6y agoSame initial thought. Again, not to take anything away from the coolness of raycasting.
- ahuth 6y agoGood question, and mainly to see if I could. Also, React was a convenient way to render some DOM. But you're right, vanilla JS would easily do the job.
- proc0 6y agoCan only be a demo, this has been even done in Excel.
- schwartzworld 6y agoReact actually makes sense to me here. Op would have to manually update the dom constantly using vanilla JS. React allows them to worry about the programming side but not have to worry about how they are going to propogate those changes to the view layer.
- tshaddox 6y agoYeah. It allows the programmer to code using a similar mental model to coding with the canvas tag, where one would probably just draw the entire frame from scratch every frame. Granted, with the speed of modern browsers and the relative simplicity of this rendering, one could probably literally wipe the DOM layer and rewrite it every frame without having any performance issues. But if the rendering became more complicated it’s conceivable that React’s virtual DOM stuff could noticeably improvement performance.
- brundolf 6y agoReact would make little to no sense here if canvas or webgl were being used. But given that polygons are rendered as elements, using React makes a ton of sense