supereggbert / aframe-htmlembed-component

HTML Component for A-Frame VR that allows for interaction with HTML in VR. Demo https://supereggbert.github.io/aframe-htmlembed-component/dist/examples/index.html
MIT License
196 stars 41 forks source link

Scrolling #2

Open jhb opened 5 years ago

jhb commented 5 years ago

First: thanks a lot for creating this component!

I wondered if there could be a way to have longer content scrolling, e.g. "overflow: scroll" support?

Thanks!

supereggbert commented 5 years ago

I did think about including that but the problem is you can't render with a scroll offset to canvas, there is a hack but it will likely mess up some of the css. There is an additional problem in that the performance for scrolling will probably be really bad which is the same reason I backed off trying to get CSS animations and transitions working for the moment. However, I'll take a look to see if I can get something working in the medium term even if the performance is bad.

If it's urgent, you can achieve a scrolling effect by simply having a div with overflow hidden and simply set the margin of a containing div to a negative value to offset ie <div style="overflow:hidden"><div style="margin-top: -50px">content</div></div>

Utopiah commented 5 years ago

Example of scrolling https://github.com/supereggbert/aframe-htmlembed-component/issues/4#issuecomment-516011364