BabylonJS / Extensions

Extensions for Babylon.js
178 stars 157 forks source link

HtmlMesh Extension #257

Closed ericwood73 closed 9 months ago

ericwood73 commented 9 months ago

The HtmlMesh is a BabylonJS mesh that displays a webpage (or DOM element) in the scene, meaning that it can occlude other meshes and be occluded by other meshs.

Online Demo

BabylonJS Playground. Note the currently only works in fullscreen. There is an issue with getting the wrong canvas size initially.

The following uses cases are supported by the HtmlMesh

Note that the use of HtmlMesh requires that the experience be accessed through a browser so in it's current form, this will not work in native apps or in XR. If constructed outside of a browser context, the HtmlMesh instances will not have any geometry and will be disabled. In the future, it might make sense to have them appear with placeholder content of perhaps even an option to view the raw HTML in a popup UI.

ericwood73 commented 9 months ago

@sebavan Think I addressed all of your comments.

sebavan commented 9 months ago

starting a deeper pass :-)

ericwood73 commented 9 months ago

@sebavan I don't see an option to merge. Maybe I don't have merge rights?

sebavan commented 9 months ago

All done !!! thanks for the contribution !!!!