krpano

 

<krpano> <!-- krpano 1.19.pr8 - Virtual Tour Skin --> <!-- maps="false" 是否使用必应地图或谷歌地图 maps_type="bing" 选择使用谷歌地图或必应地图 maps_bing_api_key="" 必应地图所需的API密钥,需申请 maps_google_api_key="" 谷歌地图所需的API密钥,需申请 maps_zoombuttons="false" 是否在地图上显示缩放按钮 gyro="true" 是否使用陀螺仪 webvr="true" 是否启用VR webvr_gyro_keeplookingdirection="false" 进入陀螺仪或VR时是否保持观看方向 webvr_prev_next_hotspots="true" 在VR下是否启用导航到前后场景的链接热点 littleplanetintro="false" 是否使用小行星开场 title="true" 是否左下角显示title 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.normal="20" 导航条背景与屏幕底部的距离 controlbar_offset_closed="-40" 导航条隐藏状态时与屏幕底部的距离 controlbar_overlap.no-fractionalscaling="10" 在不支持分级缩放页面和设置像素比的设备的导航条重叠的像素 controlbar_overlap.fractionalscaling="0" 支持分级缩放页面和设置像素比的设备的导航条重叠的像素 design_skin_images="vtourskin.png" 皮肤所用的源图片 design_bgcolor="0x000000" 皮肤的背景颜色 design_bgalpha="0.5" 皮肤的透明度 design_bgborder="0 0xFFFFFF 1.0" 皮肤的边框 design_bgroundedge="1" 皮肤边框圆角设置 design_bgshadow="0 0 9 0xFFFFFF 0.5" 皮肤的背景阴影 design_thumbborder_bgborder="4 0xFFFFFF 1.0" 皮肤的缩略图边框 design_thumbborder_padding="2" 皮肤缩略图边框间距 design_thumbborder_bgroundedge="5" 皮肤缩略图边框的圆角 design_text_css="color:#FFFFFF; font-family:Arial; font-weight:bold;"皮肤文字样式 design_text_shadow="1" 皮肤的文字阴影 --> <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="true" 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="loading..." 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" /> <!-- save the url path of this xml file (the url value will be adjusted during xml parsing) --> <vtourskinxmlpath url="./" /> <!-- mouse / touch / keyboard(button) control settings - http://krpano.com/docu/xml/#control --> <!-- 鼠标触屏键盘控制的设定 --> <control mouse="drag" touch="drag" zoomtocursor="false" zoomoutcursor="false" draginertia="0.1" dragfriction="0.9" movetoaccelerate="1.0" movetospeed="10.0" movetofriction="0.8" keybaccelerate="0.09" keybfriction="0.94" keybfovchange="0.25" mousefovchange="1.0" fovspeed="3.0" fovfriction="0.9" bouncinglimits="true" /> <!-- mouse cursors - http://krpano.com/docu/xml/#cursors --> <!-- 鼠标光标设定可自定义光标的样式 --> <cursors standard="default" dragging="move" moving="move" /> <!-- ensure stagescale 2x for mobile devices (regardless if mobilescale is 0.5 or 1.0) --> <krpano stagescale="calc:stagescale * 2" if="stagescale LT 1.0" devices="mobile" /> <!-- include VR support - http://krpano.com/plugins/webvr/ --> <!-- WebVR插件 --> <include url="%SWFPATH%/plugins/webvr.xml" devices="html5" /> <!-- overwrite some settings from the webvr.xml for the skin integration --> <!-- 覆盖WebVR默认设定 --> <!-- onavailable去除插件自定义的进入VR按钮(因为皮肤中已包含)webvr_enterbutton skin_arrange_buttons初始化皮肤按钮 webvr_onavailable()初始化设定,显示Enter VR 按钮--> <!-- onentervr skin_showloading去除加载文字 webvr_setup 设置场景切换热点并跟随 webvr_onentervr 将所有没有添加vr="true"的layer隐藏,并显示VR的Layer skin_reloadscene_webvr 显示屏幕旋转提示图片--> <plugin name="WebVR" keep="true" devices="html5" pluginurl="%SWFPATH%/plugins/webvr.js" url="" multireslock.desktop="true" multireslock.mobile.or.tablet="false" mobilevr_support="true" mobilevr_fake_support="true" onavailable="removelayer(webvr_enterbutton); skin_arrange_buttons(); webvr_onavailable();" onentervr="skin_showloading(false); webvr_onentervr(); webvr_setup(); skin_reloadscene_webvr();" onexitvr="webvr_onexitvr(); webvr_setup(); skin_reloadscene_webvr();" /> <!-- webvr button style (adjust to match skin style) --> <!-- 修改WebVR界面的style使其符合当前场景的样式 主要设置背景颜色和文字 --> <style name="webvr_button_style" border="false" roundedge="calc:1.0" backgroundcolor="get:skin_settings.design_bgcolor" backgroundalpha="get:skin_settings.design_bgalpha" shadow="0.01" shadowrange="10.0" shadowangle="90.0" shadowcolor="0x30261B" shadowalpha="0.50" css="calc:skin_settings.design_text_css + ' color:#FFFFFF;font-size:' + 20*webvr_setup_scale*webvr_button_scale + 'px;'"/> <!-- show a 'rotate the device' info when the mobile device is in portrait orientation in VR mode --> <!-- 显示屏幕旋转提示图片 devices="mobile" 只在手机模式下--> <layer name="webvr_rotate_to_landscape_request" keep="true" vr="true" devices="mobile" url="rotate_device.png" scale="0.5" align="top" edge="center" y="28%" autoalpha="true" alpha="0.0" enabled="false" /> <!-- WebVR相关事件触发 webvr_set_startup_view 设置镜头位置 onloadcomplete根据场景数目觉得是否显示VR场景切换热点--> <events name="webvr_events" keep="true" devices="html5" onxmlcomplete="webvr_set_startup_view()" onresize.mobile="webvr_act_as_gyro_in_portrait_mode();" onloadcomplete="delayedcall(0.5, if(webvr.isenabled AND scene.count GT 1 AND skin_settings.webvr_prev_next_hotspots, set(hotspot[webvr_prev_scene].visible,true); set(hotspot[webvr_next_scene].visible,true); ); );" onviewchange="" /> <!-- 根据VR是否打开设置镜头位置 --> <action name="webvr_set_startup_view"> if((webvr.isenabled OR plugin[skin_gyro].enabled) AND skin_settings.webvr_gyro_keeplookingdirection == false, skin_lookat( get(xml.view.hlookat) ); ); </action> <!-- 进入VR时设定 --> <action name="webvr_setup"> if(webvr.isenabled, <!-- 读取自定义设定 --> copy(loadscene_flags_backup, skin_settings.loadscene_flags); <!-- 设置为 MERGE|KEEPVIEW|KEEPMOVING|NOPREVIEW--> set(skin_settings.loadscene_flags, MERGE|KEEPVIEW|KEEPMOVING|NOPREVIEW); <!-- 打开WebVR时是否竖屏启动陀螺仪 --> webvr_act_as_gyro_in_portrait_mode(true); <!-- 读取设置是否显示VR模式下的上下按钮 并且设置跟随--> if(scene.count GT 1 AND skin_settings.webvr_prev_next_hotspots, set(hotspot[webvr_prev_scene].visible, true); set(hotspot[webvr_next_scene].visible, true); set(events[webvr_events].onviewchange, webvr_menu_following()); ); , if(loadscene_flags_backup !== null, copy(skin_settings.loadscene_flags, loadscene_flags_backup)); tween(layer[webvr_rotate_to_landscape_request].alpha, 0.0, 0.0); set(hotspot[webvr_prev_scene].visible, false); set(hotspot[webvr_next_scene].visible, false); set(events[webvr_events].onviewchange, null); ); </action> <!-- 打开WebVR时是否竖屏启动陀螺仪 --> <action name="webvr_act_as_gyro_in_portrait_mode"> if(device.mobile AND webvr.isenabled, div(aspect, stagewidth, stageheight); if(aspect != lastaspect OR '%1' == 'true', copy(lastaspect, aspect); if(stagewidth GT stageheight, <!-- landscape orientation - use stereo rendering and a direct/fast gyro sensor mode --> set(display.stereo, true); set(webvr.mobilevr_sensor_mode, 3); webvr.update(); tween(layer[webvr_rotate_to_landscape_request].alpha, 0.0, 0.0); , <!-- portrait orientation - use normal rendering and a smoother/slower gyro sensor mode --> set(display.stereo, false); set(webvr.mobilevr_sensor_mode, 1); webvr.update(); tween(layer[webvr_rotate_to_landscape_request].alpha, 1.0); delayedcall(3.0, tween(layer[webvr_rotate_to_landscape_request].alpha, 0.0, 1.0); ); ); ); , set(lastaspect, 0); ); </action> <!-- VR scene switching hotspots --> <!-- VR场景切换热点 distorted="true" 热点跟随场景扭曲--> <style name="webvr_menu_style" depth="800" scale="0.5" distorted="true" ath="0" atv="45" alpha="0.5" /> <hotspot name="webvr_prev_scene" keep="true" style="skin_base|webvr_menu_style" crop="0|64|64|64" ox="-64" onover="tween(scale,0.6);" onout="tween(scale,0.5);" vr_timeout="750" οnclick="skin_nextscene_loop(-1);" visible="false" devices="html5.and.webgl" /> <hotspot name="webvr_next_scene" keep="true" style="skin_base|webvr_menu_style" crop="64|64|64|64" ox="+64" onover="tween(scale,0.6);" onout="tween(scale,0.5);" vr_timeout="750" οnclick="skin_nextscene_loop(+1);" visible="false" devices="html5.and.webgl" /> <!-- floating/following VR hotspots --> <!-- 设置VR模式下跟随镜头的场景切换热点 --> <action name="webvr_menu_following" type="Javascript" devices="html5"><![CDATA[ var hs1 = krpano.get("hotspot[webvr_prev_scene]"); var hs2 = krpano.get("hotspot[webvr_next_scene]"); //头追没有移动到热点处的时候 if(!hs1.hovering && !hs2.hovering) { var f = 0.01; // following speed factor var h = krpano.view.hlookat;//获取当前场景的垂直度数(垂直180°) var v = krpano.view.vlookat;//获取当前场景的水平度数(水平360°) var hsh = hs1.ath; var hsv = hs1.atv; //将度数转化为距离设置到热点上 h = (h -(h|0)) + (((h|0) +360180)%360) - 180.0; v = (v -(v|0)) + (((v|0) +360180)%360) - 180.0; hsh = (hsh-(hsh|0)) + (((hsh|0)+360180)%360) - 180.0; var dh = h - hsh; dh += (dh > 180) ? -360 : (dh

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值