You are not logged in.

San7

Professional

  • "San7" started this thread

Posts: 626

Occupation: coding in krpano

  • Send private message

1

Tuesday, September 18th 2018, 2:59pm

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?


Source code

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>

This post has been edited 1 times, last edit by "San7" (Sep 18th 2018, 7:24pm)


2

Monday, September 24th 2018, 6:25pm

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

San7

Professional

  • "San7" started this thread

Posts: 626

Occupation: coding in krpano

  • Send private message

3

Monday, September 24th 2018, 6:48pm

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