Streamlit Components, Wrap around React Three Fiber?

Any thoughts on whether it would be possible to use streamlit components to selectively wrap around React Three Fiber to expose a simple way to render 3D visualizations, permit orbiting view, and allow basic interaction like clicking on objects?

ref:

Something like this should be possible, the biggest thing is defining how the Python side would interact with the React portion. There’s also the question if you can re-use an existing Python wrapper of threejs, which would make the component even easier:

https://pythreejs.readthedocs.io/en/stable/

I’m still digging, but it seems like pythreejs would be easier to integrate (big plus) but is a lower level language than react-three-fiber so making something with it would take longer.

1 Like