exolun Posted October 20, 2017 Share Posted October 20, 2017 Hi Folks, I'm trying to build a Babylon app that will potentially pull in external content, and some of the content would be very easy to present if I were able to put rendered HTML inside of my Babylon scene. Is it possible to render some HTML in Babylon? Possibly as a sprite or a texture on a mesh? Quote Link to comment Share on other sites More sharing options...
focomoso Posted October 20, 2017 Share Posted October 20, 2017 Completely off the top of my head, but you may want to look at rendering html into a canvas and then grabbing that image and applying it as a texture: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Drawing_DOM_objects_into_a_canvas Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 20, 2017 Share Posted October 20, 2017 Hi guys! Hey, I recently mentioned HTML-on-a-plane in another thread. DJ view! Focomoso is precisely right, I think. A picture of a webpage... as a texture... works. But no browser-like interacting allowed. What a shame, eh? *nod* Quick reminder (and a hearty welcome-to-forum) to exolon... you CAN absolute-position any HTML node atop/over a canvas... but it is not really part of the canvas webGL scene. A canvas has a "context". Sometimes 2d, sometimes 3d, but no mixed hybrids, yet. Ok, bye again. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 20, 2017 Share Posted October 20, 2017 http://www.babylonjs-playground.com/#1BUXYF#19 this is not render this is exact html in iframe maybe help http://www.babylonjs-playground.com/#WADD47#1 http://www.babylonjs-playground.com/#1BUXYF#24 clong365, Wingnut and Arte 3 Quote Link to comment Share on other sites More sharing options...
exolun Posted October 20, 2017 Author Share Posted October 20, 2017 Thanks guys, I'll try a couple of these and let you know how it goes! @Wingnut - definitely looking to put it inside the scene on a plane. Hoping to put some rendered elements inside of a VR scene. Wingnut and NasimiAsl 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.