ui.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  1. <krpano>
  2. <!--首屏弹出-->
  3. <layer name="home" type="container" bgcolor="0x000000" keep="true" width="100%" height="100%" align="center" zorder="900" bgalpha="1" bgcapture="true" visible="true" onclick2="if(progress.progress GT 0.9 , set(visible,false))">
  4. <layer name="homebg" type="image" url.normal="https://bigscene.4dage.com/panorama/img/pc/homebg.jpg" url.mobile="https://bigscene.4dage.com/panorama/img/mobile/homebg.png" align="top"
  5. keep="true" x="0%" y.mobile="0%" zorder="1" width.mobile="100%" height.mobile="prop" visible="true" onclick2="set(layer[home].visible,false)" onloaded="resize();js(hidload);"/>
  6. <layer name="hometitle" type="image" url.normal="https://bigscene.4dage.com/panorama/img/pc/title.png" url.mobile="https://bigscene.4dage.com/panorama/img/mobile/title.png" align="top"
  7. keep="true" x="3%" y.mobile="40%" zorder="10" width.normal="prop" width.mobile="80%" height.normal="46%" height.mobile="prop" visible="true" y="3%" onloaded="" onclick2="set(layer[home].visible,false)" />
  8. <!--<layer name="homelogo" type="image" url="https://bigscene.4dage.com/panorama/img/pc/blogo.png" align="top"
  9. keep="true" x="0%" y.mobile="31%" zorder="10" width.normal="prop" width.mobile="prop" height.normal="15%" height.mobile="14%" visible="true" onloaded="" y="84%" /> -->
  10. <layer name="homecn" type="image" url.normal="https://bigscene.4dage.com/panorama/img/pc/cnen.png" url.mobile="https://bigscene.4dage.com/panorama/img/mobile/cnen.png"
  11. align="top" keep="true" x="0%" y.mobile="40%" zorder="10" width.normal="prop" width.mobile="prop" height.normal="6%" height.mobile="6%" visible="true" onloaded="" y="80%" ox="0%" onclick="enter(cn);js(krqstunm(1))" />
  12. </layer>
  13. <events name="ui" keep="true" onresize="resize" />
  14. <action name="picture_resize">
  15. <!-- 使用屏幕宽度或高度的百分之九十 -->
  16. div(aspect, layer[%1].imagewidth, layer[%1].imageheight);
  17. mul(new_width, stagewidth, 1);
  18. div(new_height, new_width, aspect);
  19. mul(max_height, stageheight, 2);
  20. if(new_height GT max_height,
  21. copy(new_height, max_height);
  22. mul(new_width, new_height, aspect);
  23. );
  24. roundval(new_width);
  25. roundval(new_height);
  26. copy(layer[%1].width, new_width);
  27. copy(layer[%1].height, new_height);
  28. </action>
  29. <action name="resize" autorun="onstart">
  30. if(device.mobile,
  31. div(bl,stagewidth,stageheight);
  32. set(layer[scene_info_text].css,color:#fff; font-family:Arial; font-weight:500; font-size:50px; line-height:66px; text-indent:50px;);
  33. if(device.iphone,
  34. set(layer[homebg].height,100%);
  35. set(layer[homebg].width,prop);
  36. ,
  37. set(layer[homebg].height,100%);
  38. set(layer[homebg].width,100%);
  39. );
  40. set(layer[homebg].y,0);
  41. if(bl GT 1.77,
  42. set(layer[homebg].url,https://bigscene.4dage.com/panorama/img/pc/homebg.jpg);
  43. <!--set(layer[hometitle].url,https://bigscene.4dage.com/panorama/img/mobile/title.png); -->
  44. <!--set(layer[hometitle].y,15%);set(layer[hometitle].width,prop);set(layer[hometitle].height,40%); -->
  45. set(layer[infoimg].width,prop);
  46. set(layer[infoimg].height,60%);
  47. set(layer[fxmask].height,70%);
  48. set(layer[fxmask].width,prop);
  49. ,
  50. set(layer[homebg].url,https://bigscene.4dage.com/panorama/img/mobile/homebg.png);
  51. <!--set(layer[hometitle].url,https://bigscene.4dage.com/panorama/img/mobile/title.png); -->
  52. <!--set(layer[hometitle].y,10%);set(layer[hometitle].width,50%);set(layer[hometitle].height,prop); -->
  53. set(layer[infoimg].width,80%);
  54. set(layer[infoimg].height,prop);
  55. set(layer[fxmask].height,prop);
  56. set(layer[fxmask].width,80%);
  57. );
  58. ,
  59. div(bl,stagewidth,stageheight);
  60. if(bl GT 1.77,
  61. copy(layer[homebg].width,stagewidth);
  62. set(layer[homebg].height,prop);
  63. set(layer[fxmask].height,40%);
  64. set(layer[fxmask].width,prop);
  65. ,
  66. copy(layer[homebg].height,stageheight);
  67. set(layer[homebg].width,prop);
  68. set(layer[fxmask].height,40%);
  69. set(layer[fxmask].width,prop);
  70. );
  71. );
  72. </action>
  73. <!--场景信息-->
  74. <events name="scene_info" keep="true" onnewpano="initsceneinfo"/>
  75. <action name="initsceneinfo">
  76. trace(info);
  77. txtadd(layer[scene_info].url,https://bigscene.4dage.com/panorama/img/cninfo/,get(scene[get(xml.scene)].gid),.png);
  78. set(layer[scene_info_text].html,get(scene[get(xml.scene)].title));
  79. set(layer[scene_info].height,0);
  80. nav_control();
  81. </action>
  82. <layer name="scene_info_bg" type="container" handcursor="true" bgcolor="0x000000" bgalpha="0.3" keep="true" x="0%" y.mobile="5%" y.normal="5%" zorder="100" width.normal="24%" width.mobile="60%" height.normal="48px" height.mobile="70px" visible="true" onloaded="" >
  83. <layer name="scene_info_text" keep="true"
  84. url="https://bigscene.4dage.com/panorama/plugins/textfield.swf"
  85. align="centercenter"
  86. y="0%"
  87. x="0"
  88. width="100%"
  89. height="100%"
  90. background="false"
  91. css="color:#fff; font-family:Arial; font-weight:500; font-size:40px; line-height:40px; text-indent:50px; "
  92. html=""
  93. onclick="dropDown();"
  94. >
  95. </layer>
  96. <layer name="scene_cnicon" type="image" url="https://bigscene.4dage.com/panorama/images/cnicon.png" align="topleft"
  97. keep="true" x="0%" y="0%" zorder="10" width.normal="prop" width.mobile="prop" height="100%" height.mobile="100%" visible="true" onloaded="" />
  98. <layer name="scene_info" type="image" url.normal="https://bigscene.4dage.com/panorama/img/pc/info.png" align="topleft"
  99. keep="true" x="0%" y="100%" zorder="0" width.normal="100%" width.mobile="100%" height="0%" height.mobile="0%" visible="true" onloaded="" />
  100. </layer>
  101. <action name="dropDown">
  102. if(layer[scene_info].height == 0, set(layer[scene_info].height,prop), set(layer[scene_info].height,0))
  103. </action>
  104. <!--点赞-->
  105. <!-- <layer name="dianzhan" type="image" url.normal="https://bigscene.4dage.com/panorama/img/pc/zhan.png" crop="0|80|135|80" crop1="0|0|135|80" crop2="0|80|135|80"
  106. align="topright" keep="true" x="100" y="5%" zorder="10" width="prop" height="30" visible="false" onloaded=""
  107. onclick="if(crop == '0|0|135|80',js(like),js(unlike))" >
  108. <layer name="zhannum" url="https://bigscene.4dage.com/panorama/plugins/textfield.swf" align="right" edge="left" x="-5" autowidth="true" background="false" border="false" padding="5 6" html="999"
  109. css.normal="color:#FFFFFF; font-family:Arial; font-size:18px;"
  110. css.mobile="color:#FFFFFF; font-family:Arial; font-size:18px;"
  111. />
  112. <layer name="zhanleft" url="https://bigscene.4dage.com/panorama/plugins/textfield.swf" align="left" edge="right" x="-10" autowidth="true" background="false" border="false" padding="5 6" html="9999"
  113. css.normal="color:#FFFFFF; font-family:Arial; font-size:18px;"
  114. css.mobile="color:#FFFFFF; font-family:Arial; font-size:18px;"
  115. >
  116. <layer name="llsimg" type="image" url.normal="https://bigscene.4dage.com/panorama/img/pc/lls.png" edge="right"
  117. align="left" keep="true" x="-5%" zorder="10" width="prop" height="30" visible="true"
  118. />
  119. </layer>
  120. </layer>
  121. <action name="like">
  122. copy(layer[dianzhan].crop,layer[dianzhan].crop2);
  123. add(layer[zhannum].html,1);
  124. </action>
  125. <action name="unlike">
  126. copy(layer[dianzhan].crop,layer[dianzhan].crop1);
  127. sub(layer[zhannum].html,1);
  128. </action> -->
  129. <!--热点-->
  130. <style name="skin_hotspotstyle" url="https://bigscene.4dage.com/panorama/img/spot.png" scale="0.5" scale.mobile="0.7" edge="top" distorted="false"
  131. tooltip=""
  132. onclick="loadscene(get(linkedscene));skin_updatescroll();"
  133. onover="tween(scale,0.55);"
  134. onout="tween(scale,0.5);"
  135. />
  136. <style name="hp_hotspotstyle" url="https://bigscene.4dage.com/panorama/img/pc/hotspot/ll.jpg" scale="0.5" edge="bottom" distorted="false"
  137. tooltip="" onloaded="add_img" onclick="lookto(get(hotspot[get(linkedscene)].ath),get(hotspot[get(linkedscene)].atv),50,linear(50),,,
  138. loadscene(get(linkedscene),,MERGE,ZOOMBLEND(2.0, 2.0, easeInOutSine));skin_updatescroll();
  139. );"
  140. />
  141. <style name="hp2_hotspotstyle" scale="0.4" edge="bottom" distorted="false"
  142. tooltip="" onclick="lookto(get(hotspot[get(name)].ath),get(hotspot[get(name)].atv),80,linear(50),,,
  143. loadscene(get(name),,MERGE,ZOOMBLEND(2.0, 2.0, easeInOutSine));skin_updatescroll();
  144. );"
  145. />
  146. <style name="small_hotspotstyle"
  147. scale="1" edge="bottom" distorted="false"
  148. tooltip=""
  149. zorder="1"
  150. url="https://bigscene.4dage.com/panorama/img/pc/hotspot2.png"
  151. onclick="looktohotspot(get(name),50);"
  152. onloaded="add_hotspot_text();"
  153. >
  154. </style>
  155. <action name="add_hotspot_text">
  156. txtadd(tooltipname, 'tooltip_', get(name));
  157. addplugin(get(tooltipname));
  158. txtadd(plugin[get(tooltipname)].parent, 'hotspot[', get(name), ']');
  159. set(plugin[get(tooltipname)].url,'https://bigscene.4dage.com/panorama/plugins/textfield.swf');
  160. set(plugin[get(tooltipname)].align,top);
  161. set(plugin[get(tooltipname)].edge,bottom);
  162. set(plugin[get(tooltipname)].x,0);
  163. set(plugin[get(tooltipname)].y,0);
  164. set(plugin[get(tooltipname)].width,auto);
  165. set(plugin[get(tooltipname)].autoheight,true);
  166. set(plugin[get(tooltipname)].background,true);
  167. set(plugin[get(tooltipname)].backgroundcolor,0x000000);
  168. set(plugin[get(tooltipname)].roundedge,8);
  169. set(plugin[get(tooltipname)].backgroundalpha,0.7);
  170. set(plugin[get(tooltipname)].border,true);
  171. set(plugin[get(tooltipname)].glow,4);
  172. set(plugin[get(tooltipname)].glowcolor,0xFFFFFF);
  173. set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:28px; padding: 0 10px;');
  174. set(plugin[get(tooltipname)].textshadow,1);
  175. set(plugin[get(tooltipname)].textshadowrange,6.0);
  176. set(plugin[get(tooltipname)].textshadowangle,90);
  177. set(plugin[get(tooltipname)].html,get(title));
  178. set(plugin[get(tooltipname)].enabled,false);
  179. </action>
  180. <style name="ar_hotspotstyle" url="https://bigscene.4dage.com/panorama/img/ar_hotspot.png" scale="0.5" devices="mobile" scale.mobile="0.7" edge="top" distorted="false"
  181. tooltip=""
  182. onclick="js(callar)"
  183. onover="tween(scale,0.55);"
  184. onout="tween(scale,0.5);"
  185. />
  186. <!--控制栏-->
  187. <style name="btn_base" url="https://bigscene.4dage.com/panorama/img/pc/btn.png" keep="true" align="lefttop" edge="center" height.normal="20%" width="prop"/>
  188. <layer name="btnbar" type="container" keep="true" width="96" visible.mobile="false"
  189. height="36%" align="rightcenter" x="0.5%" zorder="100" >
  190. <layer name="btn7" style="btn_base|show_tip" crop="136|20|96|96" x="49%" y="12%" text="返回主页" etext="Home"
  191. onclick="if(xml.scene == scene_01, set(crop,136|20|96|96); , loadscene(scene_01,,,BLEND(1.0, easeInCubic));skin_updatescroll();
  192. set(inscene,false); set(inscene,false); )"/>
  193. <layer name="btn1" style="btn_base|show_tip" crop="20|136|96|96" x="49%" y="62%" text="切换场景" etext="Switch the Scene"
  194. onclick="skin_showthumbs();"/>
  195. <layer name="btn2" style="btn_base|show_tip" crop="136|136|96|96" x="49%" y="37%" text="背景音乐" etext="Music"
  196. onclick="if(crop == '136|136|96|96'
  197. ,set(crop,20|136|96|96);pausesound(bgm);pausesound(sp);
  198. ,set(crop,136|136|96|96);resumesound(bgm);autosp(true);)" />
  199. <layer name="btn4" style="btn_base|show_tip" crop="20|368|96|96" x="49%" y="87%" text="自动旋转" etext="Autorotation"
  200. onclick="if(crop == '20|368|96|96'
  201. ,startview();
  202. ,stopview();)"/>
  203. </layer>
  204. <style name="mobbtn" url="https://bigscene.4dage.com/panorama/img/pc/btn.png" width="12%" height="prop" x="3%" keep="true" visible.normal="false" align="righttop" zorder="100"/>
  205. <layer name="mbtn7" style="mobbtn" y="5%" crop="136|20|96|96" onclick="if(xml.scene == scene_01, set(crop,136|20|96|96); , loadscene(scene_01,,,BLEND(1.0, easeInCubic));skin_updatescroll();
  206. set(inscene,false); set(inscene,false); )"/>
  207. <layer name="mbtn1" style="mobbtn" y="15%" crop="20|252|96|96" onclick="skin_showthumbs();"/>
  208. <layer name="mbtn2" style="mobbtn" y="25%" crop="136|136|96|96"
  209. onclick="if(crop == '136|136|96|96'
  210. ,set(crop,20|136|96|96);pausesound(bgm);pausesound(sp);
  211. ,set(crop,136|136|96|96);resumesound(bgm);autosp(true);)"/>
  212. <layer name="mbtn6" style="mobbtn" y="35%" crop="20|368|96|96" onclick="if(crop == '20|368|96|96'
  213. ,set(crop,'136|368|96|96');set(plugin[gyro].enabled,true);stopview();
  214. ,set(crop,'20|368|96|96');set(plugin[gyro].enabled,false););"/>
  215. <!-- <layer name="mbtn" style="mobbtn" y="50%" crop="0|300|75|80" onclick=""/>
  216. <layer name="mbtn8" style="mobbtn" y="57.5%" crop="0|497|75|80" onclick=""/> -->
  217. <events name="btnbarevt" keep="true" onnewpano="
  218. if(device.mobile,
  219. if(scene[get(xml.scene)].isar
  220. ,set(layer[mbtnar].visible,true);
  221. ,set(layer[mbtnar].visible,false);
  222. );
  223. );
  224. "
  225. />
  226. <action name="qiandao">
  227. <!-- if(%1 == 1,
  228. set(layer[btn5].crop,'450|80|56|56');set(layer[mbtn4].crop,'75|284|75|80');
  229. set(layer[btn5].onclick,null);set(layer[mbtn4].onclick,null);
  230. ,
  231. set(layer[btn6].crop,'540|80|56|56');set(layer[mbtn5].crop,'71|355|75|80');
  232. set(layer[btn6].onclick,null);set(layer[mbtn5].onclick,null);
  233. ); -->
  234. if(%1 == 1,
  235. set(layer[fxmask].url,https://bigscene.4dage.com/panorama/images/alert_bg.png);
  236. ,
  237. set(layer[fxmask].url,https://bigscene.4dage.com/panorama/images/alert_bg2.png);
  238. );
  239. openlayer(fxpano);
  240. </action>
  241. <!--热点弹出-->
  242. <!-- <layer name="infopano" type="container" keep="true" width="100%" height="100%" align="center" edge="center" zorder="200" bgcolor="0x000000" bgcapture="true" bgalpha="0.8" visible="false" onclick="hidinfo();">
  243. <layer name="infoimg" type="image" url="%HTMLPATH%/img/null.png" align="center" height="prop" width.normal="30%" width.mobile="80%" enabled="false" zorder="400">
  244. <layer name="infox" type="image" url="%HTMLPATH%/img/pc/x.png" align="bottom" edge="top" height="40" width="prop" enabled="false" zorder="400" y="-30" onclick="hidinfo();"/>
  245. </layer>
  246. </layer>
  247. <action name="showinfo">
  248. if(isen,
  249. if(device.mobile,
  250. txtadd(layer[infoimg].url,https://bigscene.4dage.com/panorama/img/mobile/einfo/,get(name),.jpg);
  251. ,
  252. txtadd(layer[infoimg].url,https://bigscene.4dage.com/panorama/img/pc/einfo/,get(name),.jpg);
  253. );
  254. ,
  255. if(device.mobile,
  256. txtadd(layer[infoimg].url,https://bigscene.4dage.com/panorama/img/mobile/info/,get(name),.jpg);
  257. ,
  258. txtadd(layer[infoimg].url,https://bigscene.4dage.com/panorama/img/pc/info/,get(name),.jpg);
  259. );
  260. );
  261. openlayer(infopano);
  262. </action>
  263. <action name="hidinfo">
  264. set(layer[infoimg].url,https://bigscene.4dage.com/panorama/img/null.png);
  265. closelayer(infopano);
  266. </action> -->
  267. <style name="info_style" fillcolor="0xFFFFFF" fillalpha="0.1" borderwidth="0"
  268. depth="-1000"
  269. scaleflying="false"
  270. tx="0"
  271. ty="0"
  272. tz="0"
  273. onloaded="tween(fillalpha,0,1,,tween(fillalpha,0.6,1,,onloaded))"
  274. onclick="showinfo"
  275. />
  276. <style name="infospot_style" url="https://bigscene.4dage.com/panorama/img/infospot.png" scale="0.8" scale.mobile="1" onclick="showinfo"
  277. crop="0|0|60|60"
  278. framewidth="60" frameheight="60" frame="0" lastframe="1"
  279. onloaded="hotspot_animate();"
  280. />
  281. <style name="sound_style" url="https://bigscene.4dage.com/panorama/img/sound.png" scale="0.8" scale.mobile="1.2" onclick="stopsound(sp);playsound(sp,get(sdul),1);"
  282. crop="0|0|60|60"
  283. framewidth="60" frameheight="60" frame="0" lastframe="1"
  284. onloaded="hotspot_animate();"
  285. />
  286. <!--切换大场景-->
  287. <layer name="inpano" type="container" bgcolor="0x000000" keep="true" width="100%" height="100%" align="center" zorder="900" bgalpha="1" bgcapture="true" visible="false" >
  288. <layer name="inimg" type="image" url="https://bigscene.4dage.com/panorama/img/in.jpg" align="top" width.normal="100%" height.normal="100%"
  289. keep="true" width.mobile="prop" height.mobile="100%"
  290. crop="0|0|1000|562.5" framewidth="1000" frameheight="562.5" frame="0" lastframe="29"
  291. />
  292. </layer>
  293. <action name="inpano_animate">
  294. inc(layer[inimg].frame,1);
  295. if(layer[inimg].frame LE layer[inimg].lastframe,
  296. mul(ypos,layer[inimg].frame,layer[inimg].frameheight);
  297. txtadd(layer[inimg].crop,'0|',get(ypos),'|',get(layer[inimg].framewidth),'|',get(layer[inimg].frameheight));
  298. delayedcall(0.1, if(loaded, inpano_animate() ) );
  299. ,
  300. set(layer[inimg].frame,0);
  301. closelayer(inpano);
  302. loadscene(get(linkedscene));skin_updatescroll();
  303. );
  304. </action>
  305. <!--手机分享-->
  306. <!-- <layer name="fxpano" type="container" bgcolor="0x000000" keep="true" width="100%" height="100%" align="center" zorder="900" bgalpha="0.6" bgcapture="true" visible="false" onclick="closelayer(get(name))">
  307. <layer name="fxjt" type="image" url="https://bigscene.4dage.com/panorama/img/fx.png" align="topright" x="3%" y="3%"
  308. keep="true" width="15%" height="prop" onloaded="isweixin"
  309. />
  310. <layer name="fxmask" url="https://bigscene.4dage.com/panorama/images/alert_bg.png" keep="true" width="80%" height="prop" align="center" zorder="900" >
  311. <layer name="fxtext" url="https://bigscene.4dage.com/panorama/plugins/textfield.swf" align="center" edge="center" y="-10%" width="80%" autoheight="true" background="false" bgcolor="0xFF0000" border="false" bgalpha="0.8" padding="5 6" html="9999"
  312. css.normal="color:#FF0000; font-family:Arial; font-size:24px;"
  313. css.mobile="color:#FF0000; font-family:Arial; font-size:24px;"
  314. />
  315. <layer name="fxerm" type="image" url="https://bigscene.4dage.com/panorama/img/fxerm.png" align="bottomright" x="3%" y="3%" keep="true" width="prop" height="30%" visible.mobile="false"/>
  316. </layer>
  317. </layer>
  318. <action name="isweixin" type="Javascript">
  319. <![CDATA[
  320. var krpano = document.getElementById("krpanoSWFObject");
  321. var ua = navigator.userAgent.toLowerCase();
  322. if(ua.match(/MicroMessenger/i)=="micromessenger") {
  323. } else {
  324. if(ua.match(/baiduboxapp/i)=="baiduboxapp") {
  325. }else{
  326. krpano.set("layer[fxjt].visible",false);
  327. }
  328. }
  329. ]]>
  330. </action> -->
  331. <control mousetype="drag2d"
  332. zoomtocursor="false"
  333. zoomoutcursor="false"
  334. mouseaccelerate="1.0"
  335. mousespeed="10.0"
  336. mousefriction="0.8"
  337. mousefovchange="1.0"
  338. keybaccelerate="0.09"
  339. keybfriction="0.94"
  340. keybfovchange="0.25"
  341. fovspeed="3.0"
  342. fovfriction="0.9"
  343. bouncinglimits="true"
  344. touchfriction="0.9"
  345. />
  346. </krpano>