Iframe inside Mesh

Hello, I recently started using three.js and I’d like to know if it’s possible to integrate the content of a iframe> tag into a texture. My goal is to create a cube and have a fully functional website on each different face of the cube. Do you have a solution or an alternative?

Not really.

Even as a great fan of vanilla three.js over react-three-fiber - I’d probably wouldn’t even bother trying to do that in vanilla three, since it takes literally 2 lines of code in react-three-fiber (see drei HTML element.) Mixing HTML and three.js is the only one exceptional case in which I’d side with @drcmda’s aggressive promotion of R3F.

And even if you don’t know react - for this I’d learn it. Doing HTML+3D in vanilla 3D is a painful chore.

1 Like