Sie sind nicht angemeldet.

1

Dienstag, 18. September 2018, 14:59

why do hot spots disappear in VR mode?

Can you please tell me why the Hotspots disappear in the VR mode?


example


This is because of this code set(layer[icon].parent,hotspot[%1]); but why?


Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<krpano version="1.19" title="Virtual Tour">
<include url="skin/vtourskin.xml" />	

<preview type="grid(cube,64,64,256,0x77FF77,0x999999,0xFFFFFF);" details="10" />	
		
<style name="hs" type="image" keep="true"  url="Audio.png"  width="50" height="prop"  />	
  	
<hotspot  name="hs_1"  style="hs" ath="-20" atv="0" onclick="click_hs(sound_1);"  />	
<hotspot  name="hs_2"  style="hs" ath="0"   atv="0" onclick="click_hs(sound_2);"  /> 
 	
<!-- onclick   -->	
<action name="click_hs">
	set(name_hs, calc('' + name + ''));
	if(webvr.isenabled,set(name_hs,get(vr_aclk_hotspot)););
	playsound(sound,%1.mp3);  
	parent_hs(get(name_hs));	
</action>	
		
<action name="parent_hs">set(layer[icon].parent,hotspot[%1]);</action>
	
<plugin name="soundinterface_HS" url.html5="plugins/soundinterface.js" preload="true" rootpath="sound" volume="0.3" />	

<!-- Icon -->	   	
<layer name="icon"  type="container" keep="true"  width="10" height="10" bgcolor="0xFFFF00" bgalpha="1" y="-20"  />	
	
</krpano>

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »San7« (18. September 2018, 19:24)


2

Montag, 24. September 2018, 18:25

Hi,

hotspots with layers are currently only supported by CSS3D-rendering.

That means as soon as adding an layer via parent to a hotspot, the rendering of that hotspot will switch to CSS3D.

But in WebVR only WebGL is possible and currently only hotspots without additional layers are supported to be rendered by WebGL.

An alternative solution would be using two hotspots:
- one for the normal hotspot image
- and a textfield hotspot at the same position above it (zorder setting)

Best regards,
Klaus

3

Montag, 24. September 2018, 18:48

Thank you, Klaus! I made hotspots instead of layers and they work well! *thumbsup*