Custom UI with Full screentoggle


(Kmullis) #1

Hi @mauricesvay this is what I accomplished with our previous discussion

http://turissystems.com/demos/purlin_spacing/

I want to adjust my custom UI so that it continues to display when toggling into fullscreen mode. I haven't been able to find anything in the api that would give me access to the a function that would check to see if the viewer is in fullscreen mode, or something to that effect.

Could anyone point me in the right direction?

Thanks!


(Shaderbytes) #2

I had to build this just the other day.

The sketchfab API can't trigger fullscreen for you as it requires user interaction. This is a browser limitation. Also fullscreen is not a mature aspect of html technology so vendor prefixing is required. Lastly it doesn't work in all browsers.

The good news is I found a handy tool on github somebody wrote that handles all the boilerplate coding and exposes some change events and availability properties etc..

I have used it successfully with the viewer and custom UI.

you can find it here ::

https://github.com/sindresorhus/screenfull.js/


(Kmullis) #3

Thanks @shaderbytes. I'll check that out.