You are not logged in.

Dear visitor, welcome to Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Thursday, January 10th 2019, 8:15am

fullscreen issue

hello everyone :
I create some elements in the tour.html,but when use the set('fullscreen', true),these elements will disappear
so I use the methods to resovle
let layer = this.krpano.get('control.layer')
but ,there has another question:
I use the button to execute the set('fullscreen', true) or toggle(fullscreen), then I'WebVR.enterVR()'), these elements I create will still appear,
if I call the enterVR first ,these elements will be appear,
so ,how can I do to make the elements disappear when I set fullscreen then enterVR ,
or is there any events to listen the vr ,when I enter or exit the vr , I can use the css style `display:none | block` to show the right elements?

my want the elements is appear when fullscreen and disappear when in vr mode


Thursday, January 10th 2019, 1:17pm


use the onentervr/onexitvr events:

E.g. from JS:

Source code

var my_events = krpano.get("events").createItem("my_event");
my_events.keep = true;
my_events.webvr_onentervr = function(){ ... };
my_events.webvr_onexitvr = function(){ ... };

Best regards,