Hi there,
I am looking for a way to extend the VR prev/next scene navigation with some more buttons.
The background is, we have some panoramas with a day/night switch - on desktop this switch is a layer, which works flawlessly.
It actually worked to add the buttons to the prev/next menu, but the the onclick value doesn't update...
Does anybody have any idea how to do the action right?
This is my scene (the other ones look similiar)
Code
<scene name="scene_WINTER_DAY" title="WINTER_DAY" onstart="" thumburl="panos/WINTER_DAY.tiles/thumb.jpg" lat="" lng="" alt="" heading="" loadscene="scene_WINTER_NIGHT" >
<control bouncinglimits="calc:image.cube ? true : false" />
<view hlookat="0.0" vlookat="0.0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
<preview url="panos/WINTER_DAY.tiles/preview.jpg" />
<image stereo="true" stereolabels="1|2">
<cube url="panos/WINTER_DAY.tiles/%t/%s/l%l/%v/l%l_%t/%s_%v_%h.jpg" multires="1024,1024,1536" />
</image>
<plugin if="!(webvr.isenabled OR device.mobilevr)" style="switch2night" name="switch2night" loadscene="scene_WINTER_NIGHT" />
<hotspot checkvr="if(webvr.isenabled, set(visible,true))" style="switch2nightVR" name="switch2nightVR" loadscene="scene_WINTER_NIGHT" />
</scene>
<scene name="scene_WINTER_NIGHT" title="WINTER_NIGHT" onstart="" thumburl="panos/WINTER_NIGHT.tiles/thumb.jpg" lat="" lng="" alt="" heading="" loadscene="scene_WINTER_DAY">
<control bouncinglimits="calc:image.cube ? true : false" />
<view hlookat="0.0" vlookat="0.0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
<preview url="panos/WINTER_NIGHT.tiles/preview.jpg" />
<image stereo="true" stereolabels="1|2">
<cube url="panos/WINTER_NIGHT.tiles/%t/%s/l%l/%v/l%l_%t/%s_%v_%h.jpg" multires="1024,1024,1536" />
</image>
<plugin if="!(webvr.isenabled OR device.mobilevr)" style="switch2day" name="switch2day" loadscene="scene_WINTER_DAY" />
<hotspot checkvr="if(webvr.isenabled, set(visible,true))" style="switch2dayVR" name="switch2dayVR" loadscene="scene_WINTER_DAY" />
</scene>
Display More
and this in my vtourskin:
Code
<!-- VR scene switching hotspots -->
<style name="skin_webvr_menu_style" torigin="view" depth="1000" scale="0.625" distorted="true" ath="0" atv="45" alpha="0.9" />
<hotspot name="skin_webvr_prev_scene" keep="true" style="skin_base|skin_webvr_menu_style" crop="0|64|64|64" ox="-88" onover="tween(scale,0.750);" onout="tween(scale,0.625);" vr_timeout="750" onclick="skin_nextscene_loop(-1);" visible="false" devices="webgl" />
<hotspot name="skin_webvr_switch_scene" keep="true" style="skin_base|skin_webvr_menu_style" scale="1.25" ox="0" vr_timeout="750" url="%SWFPATH%/skin/switch2night.svg" onclick="switchscene();" visible="false" devices="html5.and.webgl" />
<hotspot name="skin_webvr_next_scene" keep="true" style="skin_base|skin_webvr_menu_style" crop="64|64|64|64" ox="+88" onover="tween(scale,0.750);" onout="tween(scale,0.625);" vr_timeout="750" onclick="skin_nextscene_loop(+1);" visible="false" devices="webgl" />
<action name="switchscene">
loadscene(get( scene[get(xml.scene)].loadscene ), null, MERGE|KEEPVIEW, BLEND(1));
<!-- set(hotspot[skin_webvr_switch_scene].url, "%SWFPATH%/skin/switch2day.svg"); -->
</action>
the problem is, once clicked in VR, the value persists and is not updated anymore when going to other scenes.
Any help will be greatly appreciated!
Thank you and best regards,
MT