Hi,
I have uploaded a new 1.0.8 beta 8 version - build 2009-06-09,
there a new possibility for 'fly-out' hotspots was added:
<hotspot> has a new parameter - "flying":
- possible values are from 0.0 to 1.0 (for dynamic tweening)
- 0.0 = normal view
- 1.0 = makes the hotspot independent from the panorama rotation and scaling (= locked to screen)
here is a example:
HTML: https://krpano.com/examples/108b8…ots/flyout.html
XML: https://krpano.com/examples/108b8…pots/flyout.xml
here the relevant code:
Code
<hotspot name="spot"
url="image.jpg"
distorted="true"
ath="45"
atv="54"
scale="0.5"
rx="-22.5" ry="-26.25" rz="-50.1"
backup_rx="0"
backup_ry="0"
backup_rz="0"
backup_scale="0"
flying="0.0"
onclick="if(flying == 0.0, flyout(), flyback() );"
/>
<!--
flyout/flyback actions
(for more stylish in/out moves play with different tweentypes and times)
-->
<action name="flyout">
<!--
save/backup the current rotation values!
NOTE - it is important that the backup_* variables are predefined!
this allows to save the variables at <hotspot> scope,
if the variables where not predefined, they were saved globally
and this would be a problem when more hotspots are using them!
-->
copy(backup_rx,rx);
copy(backup_ry,ry);
copy(backup_rz,rz);
copy(backup_scale,scale);
<!-- tween the rotations values to 0 for a flat screen view -->
tween(rx, 0);
tween(ry, 0);
tween(rz, 0);
tween(scale, 1.5);
<!--
tween 'flying' to 1.0,
this makes the hotspot independent from the panorama rotation and scaling
-->
tween(flying, 1.0);
</action>
<action name="flyback">
<!-- tween back to the stored backup values -->
tween(rx, get(backup_rx));
tween(ry, get(backup_ry));
tween(rz, get(backup_rz));
tween(scale, get(backup_scale));
<!-- tween 'flying' also back to 0.0 -->
tween(flying, 0.0);
</action>
Alles anzeigen