|
|
Source code |
1 2 3 4 5 6 7 |
<krpano> <!-- Tooltips VR --> <!-- skin_hotspotstyle_vr - style for the hotspots with VR enabled tooltips --> <style name="skin_hotspotstyle_vr" url="arrow.png" scale="0.5" edge="top" distorted="true" tooltip="" linkedscene="" linkedscene_lookat="" onclick="skin_hotspotstyle_click();" onover="tween(scale,0.55);" onout="tween(scale,0.5);" onloaded="if(linkedscene AND skin_settings.tooltips_hotspots, copy(tooltip,scene[get(linkedscene)].legenda); loadstyle(vr_tooltips); );" /> <style name="vr_tooltips" onover="tween(scale,0.55); copy(hotspot[vr_tooltip].url, tooltip); copy(hotspot[vr_tooltip].ath, ath); copy(hotspot[vr_tooltip].atv, atv); set(hotspot[vr_tooltip].visible, true); tween(hotspot[vr_tooltip].alpha, 1.0, 0.2);" onout="tween(scale,0.5); tween(hotspot[vr_tooltip].alpha, 0.0, 0.2, default, set(hotspot[vr_tooltip].visible,false); );" /> <hotspot name="vr_tooltip" keep="true" url="" distorted="true" vr_timeout="750" visible="false" alpha="0" enabled="false" zorder="2" edge="bottom" oy="-2" devices="html5.and.webgl" /> </krpano> |
|
|
Source code |
1 |
<include url="skin/vr_tooltips.xml"/> |
|
|
Source code |
1 |
<scene name="pano" title="Title" thumburl="panos/pano.tiles/thumb.jpg" legenda="legendas/pano.png"> |
|
|
Source code |
1 |
<hotspot name="spot1" style="skin_hotspotstyle_vr" ath="31.860" atv="1.305" linkedscene="pano" /> |
|
|
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
<style name="tooltip"
onover="tooltipover()"
onout="tooltipout()"
/><action name="tooltipover">
if(webvr.isenabled,
trace('tooltipover');
copy(layer[vrtooltip].html, tooltip);
set(layer[vrtooltip].visible, true);
tween(layer[vrtooltip].alpha, 1.0, 0.5);
copy(layer[vrtooltipa].html, tooltip);
set(layer[vrtooltipa].visible, true);
tween(layer[vrtooltipa].alpha, 1.0, 0.5);
asyncloop(hovering, positionTooltip(););
);
</action>
<action name="positionTooltip">
spheretoscreen(hotspot[vr_cursor].ath, hotspot[vr_cursor].atv, pos_x, pos_y);
div(pos_x, stagewidth, 4);
div(pos_y, stageheight, 2);
sub(pos_x_a, stagewidth, pos_x);
trace(plugin[WebVR].mobilevr_lens_overlap);
trace(view.hlookat);
copy(layer[vrtooltip].x,pos_x); copy(layer[vrtooltip].y,pos_y);
copy(layer[vrtooltipa].x,pos_x_a); copy(layer[vrtooltipa].y,pos_y);
</action>
<action name="tooltipout">
if(webvr.isenabled,
tween(layer[vrtooltip].alpha, 0.0, 0.25, default, set(layer[vrtooltip].visible,false));
tween(layer[vrtooltipa].alpha, 0.0, 0.25, default, set(layer[vrtooltipa].visible,false));
positionTooltip();
);
</action>
<layer name="vrtooltip" keep="true"
url="%SWFPATH%/plugins/textfield.swf"
parent="STAGE"
visible="false"
alpha="0"
enabled="false"
align="lefttop"
edge="bottom"
oy="-20"
width="400"
autoheight="true"
background="false" backgroundcolor="0xFFFFFF" backgroundalpha="1.0"
border="false" bordercolor="0x000000" borderalpha="1.0"
borderwidth="1.0" roundedge="0"
shadow="0.0" shadowrange="4.0" shadowangle="45" shadowcolor="0x000000" shadowalpha="1.0"
textshadow="1" textshadowrange="6.0" textshadowangle="90" textshadowcolor="0x000000" textshadowalpha="1.0"
css=" text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:14px;"
html=""
/>
<layer name="vrtooltipa" keep="true"
url="%SWFPATH%/plugins/textfield.swf"
parent="STAGE"
visible="false"
alpha="0"
enabled="false"
align="lefttop"
edge="bottom"
oy="-20"
width="400"
autoheight="true"
background="false" backgroundcolor="0xFFFFFF" backgroundalpha="1.0"
border="false" bordercolor="0x000000" borderalpha="1.0"
borderwidth="1.0" roundedge="0"
shadow="0.0" shadowrange="4.0" shadowangle="45" shadowcolor="0x000000" shadowalpha="1.0"
textshadow="1" textshadowrange="6.0" textshadowangle="90" textshadowcolor="0x000000" textshadowalpha="1.0"
css=" text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:14px;"
html=""
/>
|
This post has been edited 1 times, last edit by "Douglas Rhiner" (Dec 16th 2016, 12:46am)
Here is a working example:
http://www.onzeonze.com.br/clientes/dreampark/360/
Hope it's useful for someone!
|
|
Source code |
1 2 |
<krpano><!-- Tooltips VR --> <!-- skin_hotspotstyle_vr - style for the hotspots with VR enabled tooltips --><style name="skin_hotspotstyle_vr" url="vtourskin_hotspot_hexa.png" scale="0.5" edge="top" distorted="true" tooltip="" linkedscene="" linkedscene_lookat="" onclick=" if (legendb, set(hotspot[vr_tooltip].enabled,false); copy(tooltip,legendb); loadstyle(vr_tooltips); set(hotspot[vr_tooltip].enabled,true), skin_hotspotstyle_click());" onover="tween(scale,0.55);" onout="tween(scale,0.5);" onloaded="if(skin_settings.tooltips_hotspots, copy(tooltip,legenda); loadstyle(vr_tooltips); );" /> <style name="vr_tooltips" onover="tween(scale,0.55); copy(hotspot[vr_tooltip].url, tooltip); copy(hotspot[vr_tooltip].ath, ath); copy(hotspot[vr_tooltip].atv, atv); set(hotspot[vr_tooltip].visible, true); tween(hotspot[vr_tooltip].alpha, 1.0, 0.2);" onout="tween(scale,0.5); tween(hotspot[vr_tooltip].alpha, 0.0, 0.2, default, set(hotspot[vr_tooltip].visible,false); );" /> <hotspot name="vr_tooltip" keep="true" url="" distorted="true" vr_timeout="750" visible="false" alpha="0" enabled="false" zorder="2" edge="bottom" oy="-2" devices="html5.and.webgl" /> </krpano> |
|
|
Source code |
1 |
<hotspot name="spot2" style="skin_hotspotstyle_vr" ath="-139.559" atv="37.041" linkedscene=" " legenda="legendas/pan2_1.png" vr_timeout="2000" legendb="legendas/pan2_1b.png"/> |
This post has been edited 1 times, last edit by "omegas" (Mar 9th 2018, 5:17pm)
|
|
Source code |
1 |
<include url="skin/vr_tooltips.xml"/> |