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
|
<krpano onstart="start();">
<action name="addface">
addhotspot(%1);
set(hotspot[%1].url, %2);
set(hotspot[%1].ath, %3);
set(hotspot[%1].atv, %4);
set(hotspot[%1].width, 1000);
set(hotspot[%1].height, 1000);
set(hotspot[%1].distorted, true);
set(hotspot[%1].details, 16);
set(hotspot[%1].enabled, false);
set(hotspot[%1].visible, false);
set(hotspot[%1].alpha, 0.0);
set(hotspot[%1].zorder, %1);
</action>
<action name="addcube">
addface(face_%1_F, %1_f.jpg, 0, 0);
addface(face_%1_L, %1_l.jpg, -90, 0);
addface(face_%1_R, %1_r.jpg, +90, 0);
addface(face_%1_B, %1_b.jpg, +180, 0);
addface(face_%1_Z, %1_u.jpg, 0, -90);
addface(face_%1_N, %1_d.jpg, 0, +90);
</action>
<action name="checkvisible">
if(%1.alpha == 0.0, set(%1.visible,%2));
</action>
<action name="tweencubealpha">
checkvisible(hotspot[face_%1_F],true);
checkvisible(hotspot[face_%1_L],true);
checkvisible(hotspot[face_%1_R],true);
checkvisible(hotspot[face_%1_B],true);
checkvisible(hotspot[face_%1_Z],true);
checkvisible(hotspot[face_%1_N],true);
tween(hotspot[face_%1_F].alpha, %2, 0.5, default, checkvisible(hotspot[face_%1_F],false) );
tween(hotspot[face_%1_L].alpha, %2, 0.5, default, checkvisible(hotspot[face_%1_L],false) );
tween(hotspot[face_%1_R].alpha, %2, 0.5, default, checkvisible(hotspot[face_%1_R],false) );
tween(hotspot[face_%1_B].alpha, %2, 0.5, default, checkvisible(hotspot[face_%1_B],false) );
tween(hotspot[face_%1_Z].alpha, %2, 0.5, default, checkvisible(hotspot[face_%1_Z],false) );
tween(hotspot[face_%1_N].alpha, %2, 0.5, default, checkvisible(hotspot[face_%1_N],false) );
</action>
<action name="blendcubes">
sub(alpha2, 1.0, %3);
tweencubealpha(%1, %3);
tweencubealpha(%2, get(alpha2));
</action>
<action name="start">
addcube(pano1);
addcube(pano2);
set(pano1alpha, 1.0);
blendcubes(pano1, pano2, get(pano1alpha) );
set(textstyle[DEFAULT].showtime, 10);
set(textstyle[DEFAULT].origin, center);
showtext(press any key to blend to other pano);
</action>
<events onkeyup="switch(pano1alpha, 0.0, 1.0); blendcubes(pano1, pano2, get(pano1alpha) );" />
</krpano>
|