-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcustom.xml
153 lines (153 loc) · 5.8 KB
/
custom.xml
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<krpano version="1.19" title="">
<layer name="skin_layer" visible="false" width="0" height=""/>
<!-- 禁用右键菜单 -->
<contextmenu fullscreen="false" versioninfo="false" />>
<!-- customize skin settings: maps, gyro, webvr, thumbnails, tooltips, layout, design, ... -->
<skin_settings maps="false"
maps_type="google"
maps_bing_api_key=""
maps_google_api_key=""
maps_zoombuttons="false"
gyro="true"
webvr="true"
webvr_gyro_keeplookingdirection="false"
webvr_prev_next_hotspots="true"
littleplanetintro="false"
title="true"
thumbs="true"
thumbs_width="120" thumbs_height="80" thumbs_padding="10" thumbs_crop="0|40|240|160"
thumbs_opened="false"
thumbs_text="false"
thumbs_dragging="true"
thumbs_onhoverscrolling="false"
thumbs_scrollbuttons="false"
thumbs_scrollindicator="false"
thumbs_loop="false"
tooltips_buttons="false"
tooltips_thumbs="false"
tooltips_hotspots="false"
tooltips_mapspots="false"
deeplinking="false"
loadscene_flags="MERGE"
loadscene_blend="OPENBLEND(0.5, 0.0, 0.75, 0.05, linear)"
loadscene_blend_prev="SLIDEBLEND(0.5, 180, 0.75, linear)"
loadscene_blend_next="SLIDEBLEND(0.5, 0, 0.75, linear)"
loadingtext="加载..."
layout_width="100%"
layout_maxwidth="814"
controlbar_width="-24"
controlbar_height="40"
controlbar_offset="20"
controlbar_offset_closed="-40"
controlbar_overlap.no-fractionalscaling="10"
controlbar_overlap.fractionalscaling="0"
design_skin_images="vtourskin.png"
design_bgcolor="0x2D3E50"
design_bgalpha="0.8"
design_bgborder="0"
design_bgroundedge="1"
design_bgshadow="0 4 10 0x000000 0.3"
design_thumbborder_bgborder="3 0xFFFFFF 1.0"
design_thumbborder_padding="2"
design_thumbborder_bgroundedge="0"
design_text_css="color:#FFFFFF; font-family:Arial;"
design_text_shadow="1"
/>
<style name="stars" onclick="" style="skin_hotspotstyle" scale=".6" onover="tween(scale,.65);" onloaded="floatup();"
onout="tween(scale,.6);" zorder='10'/>
<style name="planet" onclick="" style="skin_hotspotstyle" scale="1" onover="tween(scale,1);"
onout="tween(scale,1);" zorder='1'/>
<style name="stars-away" onclick="" style="skin_hotspotstyle" scale=".6" onover="tween(scale,.6);" onloaded="floatup();"
onout="tween(scale,.6);" />
<style name="mc" onclick="" width='120' height='120' scale=".6" visible="false" url="images/mc/man.png" onloaded="do_crop_animation(120,120,6);"/>
<!-- 在全景里先定义添加热点的方法,在js中可调用 krpano.call('creatSpot') -->
<action name="do_crop_animation">
<!-- 为热点注册属性 -->
set(xframes, calc((imagewidth / %1) BOR 0));
set(yframes, calc((imageheight / %2) BOR 0));
set(frames, calc(xframes * yframes));
set(frame, 0);
setinterval(calc('crop_anim_' + name), calc(2.0 / %1),
if(loaded,
inc(frame);
if(frame GE frames, if(onlastframe !== null, onlastframe() ); set(frame,0); );
mod(xpos, frame, xframes);
div(ypos, frame, xframes);
Math.floor(ypos);
mul(xpos, %1);
mul(ypos, %2);
calc(crop, xpos + '|' + ypos + '|%1|%2');
,
clearinterval(calc('crop_anim_' + name));
);
);
</action>
<action name="floatup">
tween(oy,-8,1.5,linear);
mul(val, random, 1.5);
add(val,1);
delayedcall(get(val),if(loaded,floatdown();));
</action>
<action name="floatdown">
tween(oy,8,1.5,linear);
mul(val, random, 1.5);
add(val,1);
delayedcall(get(val),if(loaded,floatup();));
</action>
<action name="createSpot">
addhotspot(%1);
set(hotspot[%1].ath,%2);
set(hotspot[%1].atv,%3);
hotspot[%1].loadstyle(stars);
set(hotspot[%1].url,%4);
set(hotspot[%1].onclick,showDetail(%5));
<!-- 循环 -->
<!-- for(set(i,0), i LT detailArr.length, inc(i),
trace('',i);
); -->
</action>
<!-- 定义在scene里面添加热点action,调用在js里面的定义的addSpot方法 -->
<action type="Javascript" name="addSpot">
addSpot();
</action>
<!-- 定义热点上的点击事件,调用在js里面定义的showDetail方法-->
<action type="Javascript" name="showDetail">
var index = arguments[1][1]
showDetail(index);
</action>
<action type="Javascript" name="showTip">
showAlert('tipbox');
</action>
<action name="mylittleplanetintro">
copy(lp_scene, xml.scene);
copy(lp_hlookat, view.hlookat);
copy(lp_vlookat, view.vlookat);
copy(lp_fov, view.fov);
copy(lp_fovmax, view.fovmax);
copy(lp_limitview, view.limitview);
set(view.fovmax, 170);
set(view.limitview, lookto);
set(view.vlookatmin, 90);
set(view.vlookatmax, 90);
lookat(calc(lp_hlookat - 180), 90, 150, 1, 0, 0);
set(events[lp_events].onloadcomplete,
delayedcall(0.5,
if(lp_scene === xml.scene,
set(control.usercontrol, off);
copy(view.limitview, lp_limitview);
set(view.vlookatmin, null);
set(view.vlookatmax, null);
tween(view.hlookat|view.vlookat|view.fov|view.distortion, calc('' + lp_hlookat + '|' + lp_vlookat + '|' + lp_fov + '|' + 0.0),
3.0, easeOutQuad,
set(control.usercontrol, all);
tween(view.fovmax, get(lp_fovmax));
<!-- 小行星进场完毕 -->
showTip();
switch(plugin[skin_gyro].enabled);
set(hotspot['animate'].visible, true);
);
);
);
);
</action>
</krpano>