Sie sind nicht angemeldet.

1

Freitag, 23. September 2016, 21:31

Visible map layer in some scenes, hidden in others - Is This Possible?? {solved}

I'm just going around in circles at this point searching the forum for hours, and there's nothing I can find on this subject that I'm capable of understanding.

I have some scenes in which I require my floorplan map layer to be visible, and other scenes where it needs to be hidden.

I thought I had solved the issue myself with this in the scene name:

Quellcode

1
onstart="updateradar(); updatemap();"


and this action in the scene:

Quellcode

1
2
3
<action name="updatemap"
set(layer[map].visible,false);
</action>


(with false or true changing according to the scene)

This worked, except now my map is showing up in webVR.


At this point I have absolutely no idea how to proceed and am stuck. Any help would be much appreciated as this is the last hurdle in my project! Tnx.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »landrvr1« (27. September 2016, 23:04)


2

Samstag, 24. September 2016, 02:20

open plugins/webvr.xml and find:

Quellcode

1
2
onentervr="webvr_onentervr();"
onexitvr="webvr_onexitvr();"

change to e.g.

Quellcode

1
2
onentervr="set(vr_started,true); webvr_onentervr();"
onexitvr="set(vr_started,false); webvr_onexitvr();"

Adapt your action to:

Quellcode

1
2
3
4
5
<action name="updatemap"
ifnot(vr_started,
set(layer[map].visible,false);
);
</action>


It might be even simplier using if(webvr.isenabled.... without helper variable but I am not sure how this variable in internally handled. Check it....

3

Samstag, 24. September 2016, 16:00

Thanks Umalo, but I tried the first method below and it didn't work. The map still shows up in webvr:



code from my webvr.xml:

Quellcode

1
2
3
onentervr="set(vr_started,true); webvr_onentervr();"
onexitvr="set(vr_started,false); webvr_onexitvr();"
/>



code from my actions:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
<scene name="scene_panobegin_l" title="Begin" onstart="updateradar(); updatemap();" thumburl="panos/panobegin_l.tiles/thumb.jpg" lat="" lng="" heading="">

<action name="updateradar">
set(layer[activespot].parent, spot0); set(layer[radar].visible,false); set(layer[radar].parent, spot0); set(layer[radar].heading, -90);
</action>
 
<action name="updatemap">
ifnot(vr_started,
set(layer[map].visible,false);
);
</action>

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »landrvr1« (25. September 2016, 19:57)


4

Sonntag, 25. September 2016, 00:36

In your case you use vtourskin.xml which is overwriting some webvr attirbutes like onentervr and onexitvr. That mean changed action to set vr_started variable is not working as it is overwritten in memory. State is always null and that's reason IF is not working as we wanted. Solution: Or you add this into vtourski.xml part

Quellcode

1
2
onentervr="skin_showloading(false); webvr_onentervr(); webvr_setup(); skin_reloadscene_webvr();"
onexitvr="webvr_onexitvr(); webvr_setup(); skin_reloadscene_webvr();"

to

Quellcode

1
2
onentervr="set(vr_started,true); skin_showloading(false); webvr_onentervr(); webvr_setup(); skin_reloadscene_webvr();"
onexitvr="set(vr_started,false); webvr_onexitvr(); webvr_setup(); skin_reloadscene_webvr();"

or add vr_started set to true or false directly into webvr_onentervr and webvr_onexitvr actions

5

Sonntag, 25. September 2016, 01:39

Cool. There's been some improvement, but still some issues.

When you first enter the site and go into webVR, no map appears (yay!). Then you go into the next scene while still in webVR and no map appears - which is how it's supposed to be.

However, when in that scene you go back into pano mode, the map doesn't appear. When you click to the next scene, still in pano mode, the map will appear.


Also, the very last scene isn't supposed to have a map. If you enter that last scene in webvr, then hit escape to go into pano, the map shows up (which, again, it's not supposed to...)

Other scenes in the middle behave properly = no map in VR but map in pano.

So close! Thanks so very much for taking the time to help me, Umalo.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »landrvr1« (25. September 2016, 19:57)


6

Sonntag, 25. September 2016, 21:06

Your map visibility is handled on start of the scene. When you enter or go out of VR you need another handler to make your map visible.
e.g. onexitvr=". . . . . updatemap();"
As update map you have separately in every scene valid one is still valid.

7

Sonntag, 25. September 2016, 23:40

Are you talking about adding that into the webvr.xml?

Quellcode

1
onexitvr="set(vr_started,false); webvr_onexitvr(); updatemap();"



That didn't solve it so maybe I'm misunderstanding...

8

Montag, 26. September 2016, 00:17

What ever you put in onexitvr from webvr.xml is overwritten with onexitvr from vtourskin.xml That mean put this in vtourskin.xml part and this should work.

9

Montag, 26. September 2016, 03:16

Yes! That did the trick! Thank you very much, Umalo for taking the time to help. Check your PM.