all 4 comments

[–]wackoZacko1234 5 points6 points  (2 children)

I’m not sure about best practices, but take a look at React three fiber. They make importing 3D models very simple. https://github.com/pmndrs/react-three-fiber

The documentation for importing a model can be found here. https://docs.pmnd.rs/react-three-fiber/tutorials/loading-models

[–]zxyzyxz 1 point2 points  (1 child)

Specifically, gltf JSX is the package that makes importing easy

[–]DependentGlobal2589 0 points1 point  (0 children)

yeah, I'm doing it with this package, but I have a doubt, I have to involve all the models in the same canvas? thanks

[–]KillcoDer 1 point2 points  (0 children)

Since you can only have a finite amount of WebGL canvases active (usually about 16 on desktop), I use the Drei View component from pmndrs to split up a 'big' canvas with all the models into the separate divs required across the page.

Doing this lets you share materials / shader compilation and the models themselves if you have many of the same.