re: Creating a rudimentary pool table game using React, Three JS and react-three-fiber: Part 1 VIEW POST

re: Your first code sample appears to be missing some imports

Could you please point me to that? As far as I remember the code sample will work well.


Creating a basic scene:

First code sample uses mesh, boxBufferGeometry, and meshNormalMaterial, but only imports react. If that's accurate - how does that work?

Sorry for the late reply. So the way this works is if you are aware that the jsx we write in React is not valid HTML but there is a plugin that transpiles those calls into React.createElement call. The same way when you write <mesh /> or <boxBufferGeometry> or any of the components in the three.js catalog react-three-fiber will go and convert those calls to three js calls. For starters check out this and this

code of conduct - report abuse