Open sirkitree opened 8 years ago
I was thinking about that. It's not possible if the src is on a different website, because of the cross-origin policy. One way you could make it work would be by having an iframe as your asset, and as long as the src was on the same site, you would be able to render the texture. Would that solve your situation?
I don't think so, but could possibly work around that. I was hoping this might be more like the websurface in janusvr, but I understand that implementation is a little more like a true browser within janus than just a material. Does cross-domain hinder iframes somehow? Or just the use of an iframe as a texture?
There are serious limitations with the browser in rendering html to a texture, all to do with content security and cross-domain image tainting. It's not possible to do a full browser like Janus does, but you can render most html to a texture. The other hack is to use css3d transforms to put dom elements straight into the scene, but that's not supported with the webvr api and doesnt play well with webgl, so it's best to jump through some hoops to convert the html to a proper texture. :)
On Wed, Mar 9, 2016 at 3:03 PM, Jerad Bitner notifications@github.com wrote:
I don't think so, but could possibly work around that. I was hoping this might be more like the websurface in janusvr, but I understand that implementation is a little more like a true browser within janus than just a material. Does cross-domain hinder iframes somehow? Or just the use of an iframe as a texture?
— Reply to this email directly or view it on GitHub https://github.com/scenevr/htmltexture-component/issues/2#issuecomment-194067470 .
Regards, Ben Nolan
skype: bennolan cell: +64 21 770 662
I see that you can put crafted html in this component, but what about existing sites? Say I wanted a web surface of an actual live website. Is that possible by adding something like a src attribute?