You are not logged in.

Dear visitor, welcome to krpano.com 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.

1

Monday, February 13th 2017, 2:48pm

Show button ONLY in webvr view

Hi people,

Anyone make this way? *confused*

I need show one simple button only when my user see my pano in mobile with some glasses vr *cool* , webvr mode.

Button like "Look here to start" in webvr of krpano examples


tnx

2

Tuesday, February 14th 2017, 10:07am

The most simple way I can think of is to enable/disable the plugin in the actions "vr_setup" and "vr_setup_close" in plugins/webvr.xml. There should be already an entry like "set(webvr.vr_cursor_enabled, false);" which could be duplicated and used for your own plugins. I.e.:

set(webvr.vr_cursor_enabled, true);
set(your_own_plugin_enabled, true);

set(webvr.vr_cursor_enabled, false);
set(webvr.vr_cursor_enabled, false);

3

Tuesday, February 14th 2017, 5:06pm

Tnx Nupsi,

This is the simple and effective way! But ... if i use:


<hotspot keep="false"

...
visible="false"
enabled="false"
/>

How can i visible and enabled="true"?





*thumbsup*

This post has been edited 1 times, last edit by "eudanck" (Feb 14th 2017, 9:00pm)


4

Thursday, February 16th 2017, 2:26pm

anyone?

*whistling*

Yanward

Beginner

Posts: 17

Location: Singapore

Occupation: Software Engineer

  • Send private message

5

Friday, February 17th 2017, 3:58am

set(hotspot[hotspotname].visible,true);
set(hotspot[hotspotname].enabled,true);
Yanward *squint*

Yanward

Beginner

Posts: 17

Location: Singapore

Occupation: Software Engineer

  • Send private message

6

Friday, February 17th 2017, 4:21am

Hi,
create action to change the hotspot enabled and visible to true or false

<action name="action1">
set(hotpost[hotspotname].visible,true);
set(hotpost[hotspotname].enabled,true);
</action>

<action name="action2">
set(hotpost[hotspotname].visible,false);
set(hotpost[hotspotname].enabled,false);
</action>


to call those action when device is enter on VR Mode, go to vtourskin.xml find WebVR plugin, on that plugin, find onentervr and onexitvr and add the action you created earlier,

onentervr="skin_showloading(false); webvr_onentervr(); webvr_setup(); skin_reloadscene_webvr(); action1();"
onexitvr="webvr_onexitvr(); webvr_setup(); skin_reloadscene_webvr(); action2();"
Yanward *squint*

This post has been edited 1 times, last edit by "Yanward" (Feb 28th 2017, 4:03am)


7

Friday, February 24th 2017, 2:33pm

Cool man, great!

I try this now, and come back *thumbsup*






tnx