Thoughts on Adding HTML in scene feature (PR)

Since I keep needing to use it for various projects, I’d like to contribute an ability to display website content in BJS (this PG illustrates the concept for those not familiar). I wanted to get the team’s feedback on the best design. It would be nice to have it as a texture we could apply to a mesh, but given that it requires setting up a mesh to use as a depth mask and it can only be applied to flat surfaces, that may not be the best approach. Another option would be to create a subtype of mesh, which is how I’ve implemented it in the past. Any thoughts? Would a PR for this be welcome?

1 Like

Hi! It looks like the PG is not able to load the videos?

They are loading for me. I even tried an incognito window, in case it was only because I was logged in somewhere. One is a PDF and one is the BJS 5.0 release video.

It looks like a port of the three version which might be great to add in comments. It also probably have a lot of Edge case around Dom management and CSS. As this would not work with BabylonNative and might require adaptation for WebGPU, I think we could put it under GitHub - BabylonJS/Extensions: Extensions for Babylon.js for now and migrate in core if it gets more traction. What do you think ?

1 Like

That works for me. Thanks.

its novel but obviously any page clicks that navigate the browser dont reload within the scene but reload the actual browser ( just click the image in the wiki page and see )

You can always sandbox the iframe and disallow top-nav.

I’ve implemented this and created a PR to the Extensions project.

3 Likes