1 Star 1 Fork 2

古添乐 / krpano_vue2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test2.xml 32.20 KB
一键复制 编辑 原始数据 按行查看 历史
古添乐 提交于 2022-02-11 18:07 . index.vue
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917
<krpano version="
1.20.10
" title="
Virtual Tour
">
<include url="
skin/vtourskin.xml
" />
<include url="
%SWFPATH%/hotspot/hotspot.xml
" />
<!-- 补地logo -->
<!-- <include url="%SWFPATH%/nadir-logo/nadir-logo.xml" /> -->
<!-- 背景音乐添加 -->
<include url="
%SWFPATH%/sound/sound.xml
" />
<!-- <plugin name="soundinterface" url.flash="%SWFPATH%/plugins/soundinterface.swf" url.html5="%SWFPATH%/plugins/soundinterface.js" rootpath="" preload="true" keep="true" /> -->
<action name="
bgsnd_action
" autorun="
onstart
">
playsound(bgsnd, '%SWFPATH%/sound/Promise.mp3', 0);
</action>
<!-- -->
<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="
true
" title="
true
" thumbs="
false
" 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
" />
<!-- <action name="bgsnd_action" autorun="onstart"> playsound(bgsnd, '%SWFPATH%/sound/bang.mp3', 0)); </action> -->
<!-- <action name="bgsnd_action" autorun="onstart"> playsound(bgsnd, 'http://www.lauray.top/img/111111111111.MP3', 0)); </action> -->
<!-- 场景切换效果 -->
<blendmodes name="
no blending
" description="
无过渡效果
" blend="
NOBLEND
" />
<blendmodes name="
simple crossblending
" description="
简单淡入淡出
" blend="
BLEND(1.0, easeInCubic)
" />
<blendmodes name="
zoom blend
" description="
缩放过渡
" blend="
ZOOMBLEND(2.0, 2.0, easeInOutSine)
" />
<blendmodes name="
black-out
" description="
黑场过渡
" blend="
COLORBLEND(2.0, 0x000000, easeOutSine)
" />
<blendmodes name="
white-flash
" description="
白场过渡
" blend="
LIGHTBLEND(1.0, 0xFFFFFF, 2.0, linear)
" />
<blendmodes name="
right-to-left
" description="
从右至左
" blend="
SLIDEBLEND(1.0, 0.0, 0.2, linear)
" />
<blendmodes name="
top-to-bottom
" description="
从上至下
" blend="
SLIDEBLEND(1.0, 90.0, 0.01, linear)
" />
<blendmodes name="
diagonal
" description="
对角线
" blend="
SLIDEBLEND(1.0, 135.0, 0.4, linear)
" />
<blendmodes name="
circle open
" description="
圆形展开
" blend="
OPENBLEND(1.0, 0.0, 0.2, 0.0, linear)
" />
<blendmodes name="
vertical open
" description="
垂直展开
" blend="
OPENBLEND(0.7, 1.0, 0.1, 0.0, linear)
" />
<blendmodes name="
horizontal open
" description="
水平展开
" blend="
OPENBLEND(1.0, -1.0, 0.3, 0.0, linear)
" />
<blendmodes name="
elliptic + zoom
" description="
椭圆缩放
" blend="
OPENBLEND(1.0, -0.5, 0.3, 0.8, linear)
" />
<!-- 嵌入平面图片和视频 -->
<include url="
%SWFPATH%/video_players/video-player.xml
" />
<!-- 免费光晕 -->
<!-- <include url="%SWFPATH%/lensflare/example.xml" /> -->
<!-- 自定义地图开始, mapcontainer是一个半透明容器container,keep为true,确保了切换场景时地图不会被移除,mapcontainer是其它子layer的父亲,bgcolor以及bgalpha是颜色和透明度的设定,通过改动align以及xy坐标可以确定地图的位置,通过改变width和height确定该矩形的宽度和高度,-->
<layer name="
mapcontainer
" keep="
true
" type="
container
" bgcolor="
0x000000
" bgalpha="
0.5
" align="
lefttop
" x="
0
" y="
0
" width="
204
" height="
204
">
<!-- map的url属性可以改成我们自己的地图文件,align一定是lefttop,这是为了确定热点位置,其坐标系以左上角为0点,也是为了方便我们通过ps等方法来获取热点的值。-->
<layer name="
map
" url="
skin/b1map.png
" align="
top
" x="
4
" y="
4
" width="
prop
" height="
196
" handcursor="
false
" scalechildren="
true
">
<!-- 雷达遮罩部分,确保了雷达的扇形不会超出范围,这里也就是地图map的范围。注意这里也应该是对齐左上角,下面的各种layer通通都是对齐左上角,不然坐标系不统一的话,就很难确定热点的位置 -->
<layer name="
radarmask
" type="
container
" align="
lefttop
" width="
100%
" height="
100%
" maskchildren="
true
">
<!-- 雷达插件 zoder=1 在开始时为隐藏,只有激活activetespot这个action时才会显示 zorder为叠放次序 数字越大越靠前 -->
<layer name="
radar
" visible="
false
" url="
%SWFPATH%/plugins/radar.swf
" alturl="
%SWFPATH%/plugins/radar.js
" align="
lefttop
" edge="
center
" zorder="
1
" scale="
0.3
" fillcolor="
0xFFFFFF
" fillalpha="
0.8
" linecolor="
0xFF0000
" linewidth="
0.5
" linealpha="
0.5
" headingoffset="
0
" />
<!-- 热点 zorder=2,用style来统一处理 所有layer都载入了一个名为spot的style,注意这里spot是由0开始,而不是由1开始的,因此在一般情况下,地图点与场景一一对应,而场景的index是从0开始的,所以我们可以利用这一点提高代码的可读性-->
<layer name="
spot0
" style="
spot
" x="
113
" y="
124
" />
<layer name="
spot1
" style="
spot
" x="
94
" y="
62
" />
<layer name="
spot2
" style="
spot
" x="
55
" y="
34
" />
<layer name="
spot3
" style="
spot
" x="
13
" y="
58
" />
<!-- 激活的热点 zorder=3 开始时候隐藏,在这里是一个绿色的地图点, 表示当前的场景-->
<layer name="
activespot
" url="
skin/vtourskin_mapspotactive.png
" scale="
0.5
" oy="
-17
" align="
lefttop
" edge="
center
" zorder="
3
" visible="
false
" />
</layer>
</layer>
</layer>
<!-- 地图点中相同的代码,都写在了style里面,修改的时候只需要修改style里面的代码,提高了效率。在onclick里,先是用subtxt得出spot后面的数字,也就是index,然后检查是否点击的热点就是当前场景,因为没有必要点击当前场景的热点又载入一遍,如果是点击其他的热点,则载入其他场景,载入场景的loadscene中利用了之前得到的spotid,这样就不用每次都写场景的名字了。-->
<style name="
spot
" url="
skin/vtourskin_mapspot.png
" scale="
0.5
" oy="
-17
" align="
lefttop
" edge="
center
" zorder="
2
" onclick="
subtxt(spotid,get(name),4,2);if(spotid != scene[get(xml.scene)].index, loadscene(get(scene[get(spotid)].name),null,MERGE,BLEND(1)); );
" />
<!-- 激活热点 - %1 = 当前雷达的方向值heading
-->
<action name="
activatespot
">
for(set(i,0),i LT
scene.count,inc(i),
txtadd(spotname,'spot',get(i));
set(layer[get(spotname)].visible,
true);
);
txtadd(spotidnow,'spot',get(scene[get(xml.scene)].index));
copy(layer[radar].x,
layer[get(spotidnow)].x);
copy(layer[radar].y,
layer[get(spotidnow)].y);
copy(layer[activespot].x,
layer[get(spotidnow)].x);
copy(layer[activespot].y,
layer[get(spotidnow)].y);
set(layer[radar].heading,
%1);
set(layer[radar].visible,
true);
set(layer[activespot].visible,
true);
set(layer[get(spotidnow)].visible,
false);
</action>
<!-- 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
" maps_loadonfirstuse="
true
" gyro="
true
" gyro_keeplookingdirection="
false
" webvr="
true
" webvr_keeplookingdirection="
true
" webvr_prev_next_hotspots="
true
" autotour="
false
" littleplanetintro="
false
" followmousecontrol="
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
" />
<!-- For an alternative skin design either change the <skin_settings> values from above or optionally include one of the predefined designs from below. -->
<!-- <include url="skin/vtourskin_design_flat_light.xml" /> -->
<!-- <include url="skin/vtourskin_design_glass.xml" /> -->
<!-- <include url="skin/vtourskin_design_ultra_light.xml" /> -->
<!-- <include url="skin/vtourskin_design_117.xml" /> -->
<!-- <include url="skin/vtourskin_design_117round.xml" /> -->
<!-- <include url="skin/vtourskin_design_black.xml" /> -->
<scene name="
scene_115cdb43613ec94dbd36e7646c6f984e
" title="
115cdb43613ec94dbd36e7646c6f984e
" onstart="
activatespot(90);
" thumburl="
panos/115cdb43613ec94dbd36e7646c6f984e.tiles/thumb.jpg
" lat="
" lng="
" heading="
">
<control
bouncinglimits="
calc:image.cube ? true : false
" />
<view
hlookat="
0.0
" vlookat="
0.0
" fovtype="
MFOV
" fov="
120
" maxpixelzoom="
2.0
" fovmin="
70
" fovmax="
140
" limitview="
auto
" />
<preview
url="
panos/115cdb43613ec94dbd36e7646c6f984e.tiles/preview.jpg
" />
<image>
<cube
url="
panos/115cdb43613ec94dbd36e7646c6f984e.tiles/%s/l%l/%v/l%l_%s_%v_%h.jpg
" multires="
512,1024
" />
</image>
<include
url="
snow.xml
" />
<hotspot
name="
videospot
" url="
%SWFPATH%/video_players/media_playback_start.png
" scale="
0.5
" zoom="
true
" ath="
-26.5
" atv="
0
" onclick="
looktohotspot(get(name),90); videoplayer_open('%SWFPATH%/video_players/cats.mp4|%SWFPATH%/video_players/cats.webm', '%SWFPATH%/video_players/cats-poster.jpg', 0.5);
" />
<!-- <events name="nadirlogorotation" onviewchange="set(hotspot[nadirlogo].rotate,get(view.hlookat) );" /> -->
<!-- <hotspot name="nadirlogo" url="%SWFPATH%/nadir-logo/krpano-roundlogo.png" ath="0" atv="90" distorted="true" scale="1.0" rotate="0.0" onclick="" /> -->
<!-- <include url="%SWFPATH%/skin/lensflare.xml" /> -->
<!-- <lensflare_settings editor="true" ath="36.8" atv="-21.8" sun="0.5" glare="0.2" r_ring="0.25" exposure="true" exposure_bias="-0.5"/> -->
<!-- <layer name="lf_help" type="text" align="center" y="25%" html="Click to place lensflare effect" css="color:#FFFFFF; font-size:18px;" padding="8" txtshadow="1 1 3 0x000000 1" bg="true" bgcolor="0x000000" onclick="removelayer(lf_help)" onloaded="delayedcall(5.0, removelayer(lf_help))" /> -->
</scene>
<scene name="
scene_96ea4cf5d57934432eeb04c961f84051
" title="
96ea4cf5d57934432eeb04c961f84051
" onstart="
activatespot(90);
" thumburl="
panos/96ea4cf5d57934432eeb04c961f84051.tiles/thumb.jpg
" lat="
" lng="
" heading="
">
<control
bouncinglimits="
calc:image.cube ? true : false
" />
<view
hlookat="
0.0
" vlookat="
0.0
" fovtype="
MFOV
" fov="
120
" maxpixelzoom="
2.0
" fovmin="
70
" fovmax="
140
" limitview="
auto
" />
<preview
url="
panos/96ea4cf5d57934432eeb04c961f84051.tiles/preview.jpg
" />
<image>
<cube
url="
panos/96ea4cf5d57934432eeb04c961f84051.tiles/%s/l%l/%v/l%l_%s_%v_%h.jpg
" multires="
512,1024
" />
</image>
<include
url="
snow.xml
" />
</scene>
<scene name="
scene_alma
" title="
alma
" onstart="
activatespot(90);
" thumburl="
panos/alma.tiles/thumb.jpg
" lat="
" lng="
" heading="
">
<control
bouncinglimits="
calc:image.cube ? true : false
" />
<view
hlookat="
0.0
" vlookat="
0.0
" fovtype="
MFOV
" fov="
120
" maxpixelzoom="
2.0
" fovmin="
70
" fovmax="
140
" limitview="
auto
" />
<preview
url="
panos/alma.tiles/preview.jpg
" />
<image>
<cube
url="
panos/alma.tiles/%s/l%l/%v/l%l_%s_%v_%h.jpg
" multires="
512,640,1280
" />
</image>
<include
url="
snow.xml
" />
<include
url="
%SWFPATH%/skin/lensflare.xml
" />
<lensflare_settings
editor="
true
" ath="
36.8
" atv="
-21.8
" sun="
0.5
" glare="
0.2
" r_ring="
0.25
" exposure="
true
" exposure_bias="
-0.5
" />
<layer
name="
lf_help
" type="
text
" align="
center
" y="
25%
" html="
Click to place lensflare effect
" css="
color:#FFFFFF; font-size:18px;
" padding="
8
" txtshadow="
1 1 3 0x000000 1
" bg="
true
" bgcolor="
0x000000
" onclick="
removelayer(lf_help)
" onloaded="
delayedcall(5.0, removelayer(lf_help))
" />
</scene>
<scene name="
scene_dbc0aec6418b74e669b1e95fbda866b5
" title="
dbc0aec6418b74e669b1e95fbda866b5
" onstart="
activatespot(90);
" thumburl="
panos/dbc0aec6418b74e669b1e95fbda866b5.tiles/thumb.jpg
" lat="
" lng="
" heading="
">
<control
bouncinglimits="
calc:image.cube ? true : false
" />
<view
hlookat="
0.0
" vlookat="
0.0
" fovtype="
MFOV
" fov="
120
" maxpixelzoom="
2.0
" fovmin="
70
" fovmax="
140
" limitview="
auto
" />
<preview
url="
panos/dbc0aec6418b74e669b1e95fbda866b5.tiles/preview.jpg
" />
<image>
<cube
url="
panos/dbc0aec6418b74e669b1e95fbda866b5.tiles/%s/l%l/%v/l%l_%s_%v_%h.jpg
" multires="
512,1024
" />
</image>
<include
url="
snow.xml
" />
</scene>
<scene name="
scene_fe13adc93b10360c89fee246ab7a2fb6
" title="
fe13adc93b10360c89fee246ab7a2fb6
" onstart="
activatespot(90);
" thumburl="
panos/fe13adc93b10360c89fee246ab7a2fb6.tiles/thumb.jpg
" lat="
" lng="
" heading="
">
<control
bouncinglimits="
calc:image.cube ? true : false
" />
<view
hlookat="
0.0
" vlookat="
0.0
" fovtype="
MFOV
" fov="
120
" maxpixelzoom="
2.0
" fovmin="
70
" fovmax="
140
" limitview="
auto
" />
<preview
url="
panos/fe13adc93b10360c89fee246ab7a2fb6.tiles/preview.jpg
" />
<image>
<cube
url="
panos/fe13adc93b10360c89fee246ab7a2fb6.tiles/%s/l%l/%v/l%l_%s_%v_%h.jpg
" multires="
512,1024
" />
</image>
<include
url="
snow.xml
" />
</scene>
<scene name="
scene_puydesancy
" title="
puydesancy
" onstart="
activatespot(90);
" thumburl="
panos/puydesancy.tiles/thumb.jpg
" lat="
" lng="
" heading="
">
<control
bouncinglimits="
calc:image.cube ? true : false
" />
<view
hlookat="
0.0
" vlookat="
0.0
" fovtype="
MFOV
" fov="
120
" maxpixelzoom="
2.0
" fovmin="
70
" fovmax="
140
" limitview="
auto
" />
<preview
url="
panos/puydesancy.tiles/preview.jpg
" />
<image>
<cube
url="
panos/puydesancy.tiles/%s/l%l/%v/l%l_%s_%v_%h.jpg
" multires="
512,640,1280
" />
</image>
<include
url="
snow.xml
" />
</scene>
</krpano>
1
https://gitee.com/qin-ziyong/krpano_vue2.git
git@gitee.com:qin-ziyong/krpano_vue2.git
qin-ziyong
krpano_vue2
krpano_vue2
master

搜索帮助