Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Dienstag, 11. Oktober 2016, 19:32

Conditional hotspot for VR (stereo)

Hi all,

I have a hotspot that I need to behave in one way when in VR mode and another way when not in VR mode. As an example, I tried this kind of code:


url.no-stereo="images/large.png"
url.stereo="images/small.png"

or

url.no-webvr="images/large.png"
url.webvr="images/small.png"


since I've seen:

url.no-mobile="images/large.png"
url.mobile="images/small.png"

as examples, but nothing seems to work. Anyone know how to pull something like this off? It's fine if they end up being two different hotspots-- I just need to make sure I can get each one to only be on in the appropriate stereo mode.

Thanks!

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

2

Mittwoch, 12. Oktober 2016, 08:48

Try using 'if" check inside the hotspot attributes. For example, you have 1 spot in a scene, duplicate it and assign

Quellcode

1
if="webvr.isenabled == true"
to one spot and

Quellcode

1
if="webvr.isenabled == false"
to another. The solution may be easier, however, that depends on what is the exact difference between your spots for VR and for normal view mode.
Regards,

Alexey

3

Mittwoch, 12. Oktober 2016, 16:59

Try using 'if" check inside the hotspot attributes. For example, you have 1 spot in a scene, duplicate it and assign

Quellcode

1
if="webvr.isenabled == true"
to one spot and

Quellcode

1
if="webvr.isenabled == false"
to another. The solution may be easier, however, that depends on what is the exact difference between your spots for VR and for normal view mode.
Try using 'if" check inside the hotspot attributes. For example, you have 1 spot in a scene, duplicate it and assign

Quellcode

1
if="webvr.isenabled == true"
to one spot and

Quellcode

1
if="webvr.isenabled == false"
to another. The solution may be easier, however, that depends on what is the exact difference between your spots for VR and for normal view mode.
Thanks Alexey but dropping that code in seems to make the hotspots disappear no matter what mode I'm in. I think the real problem is that neither 'stereo' nor 'webvr' seems to be recognized as a true/false condition that changes with VR enabled or not... gah.

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

4

Mittwoch, 12. Oktober 2016, 18:39

Hm... as far as I know, when you enter VR mode (in standard Krpano tour skin, at least), the scene is being reloaded and the whole "scene" content is being parsed again, so assigning "if" check for "webvr.isenabled" inside hotspots (not inside style) must be working. Only few days ago I made some tests with VR and remember I was using this check. However, maybe I'm wrong here. Btw, what is the final purpose of all this? Do you want to asign different urls for the same hotspots while in VR?
Regards,

Alexey

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

5

Mittwoch, 12. Oktober 2016, 19:18

Sorry, it seems I was wrong about scene re-parsing when entering VR mode. VR images are reloaded (from multires to vr-ready). So the way is to use some for(); and try change hotspots on the fly when entering VR mode.
Regards,

Alexey

6

Mittwoch, 12. Oktober 2016, 20:08

Sorry, it seems I was wrong about scene re-parsing when entering VR mode. VR images are reloaded (from multires to vr-ready). So the way is to use some for(); and try change hotspots on the fly when entering VR mode.
Hi Alexey-- thanks for looking into this for me. Basically yes, I have two hyperlinks-- one for VR and one for nonVR, so I want to make sure the hotspot keeps the VR user in VR and the nonVR user not in VR.

I'm still new to XML-- would you mind writing out the code for a sample hotspot so I can understand how the for(); statement might be of use here? Thanks so much!