vue集成krpano实现在里面加文字

vue

显示文字

<hotspot name="spot4" style="your_hotspotstyle" ath="-29.334" atv="-8.413" tooltip="tooltip 1"/>

<hotspot name="spot5" style="your_hotspotstyle" ath="-29.334" atv="-21.445" tooltip="tooltip 2"/>

<style name="your_hotspotstyle"

url="%SWFPATH%/skin/vtourskin_hotspot.png"

scale="0.5" edge="top" oy="0"

distorted="false"

onloaded="add_all_the_time_tooltip();" />

<action name="add_all_the_time_tooltip">

txtadd(tooltipname, 'tooltip_', get(name));

addplugin(get(tooltipname)); txtadd(plugin[get(tooltipname)].parent, 'hotspot[',get(name),']');

set(plugin[get(tooltipname)].url,'%SWFPATH%/plugins/textfield.swf');

set(plugin[get(tooltipname)].align,top); set(plugin[get(tooltipname)].edge,bottom);

set(plugin[get(tooltipname)].x,0); set(plugin[get(tooltipname)].y,0);

set(plugin[get(tooltipname)].width,200); set(plugin[get(tooltipname)].autoheight,true);

set(plugin[get(tooltipname)].background,false); set(plugin[get(tooltipname)].border,false);

set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:16px;');

set(plugin[get(tooltipname)].textshadow,1); set(plugin[get(tooltipname)].textshadowrange,6.0); set(plugin[get(tooltipname)].textshadowangle,90);

copy(plugin[get(tooltipname)].html,hotspot[get(name)].tooltip);

set(plugin[get(tooltipname)].enabled,false);

</action>

记住要加到</scene> <scene>标签下面 这个是显示文字的

url="%SWFPATH%/skin/vtourskin_hotspot.png" 这个是显示图片一般情况都会有前缀不用管有这个照片就可以

如果你要显示热点带动态效果的

<hotspot name="spot1" style="skin_hotspotstyle1" visible="true" ath="-29.334" atv="-4.413"  text="111" linkedscene="skin_hotspotstyle1" />

<style name="skin_hotspotstyle1"

url="%SWFPATH%/hot/1.png"

crop="0|0|128|128"

framewidth="128"

frameheight="128"

frame="0"

lastframe="24"

scale="0.5"

οnclick="skin_hotspotstyle_click();"

onloaded="hotspot_animate();showtxt_name(get(name),get(text),get(ath),get(atv));"

/>

标题

<!-- 1.198版本热点点击事件 -->

<action name="skin_hotspotstyle_click">

if(linkedscene,

if(linkedscene_lookat,

txtsplit(linkedscene_lookat, ',', hs_lookat_h, hs_lookat_v, hs_lookat_fov);

);

set(enabled, false);

skin_hidetooltips();

tween(depth|alpha|oy|rx, 4000|0.0|-50|-60, 0.5, default,

skin_loadscene(get(linkedscene), get(skin_settings.loadscene_blend));

if(hs_lookat_h !== null,

skin_lookat(get(hs_lookat_h), get(hs_lookat_v), get(hs_lookat_fov));

delete(hs_lookat_h, hs_lookat_v, hs_lookat_fov);

);

skin_updatescroll();

);

);

</action>

<!-- 热点样式 属性 -->

<action name="hotspot_animate">

inc(frame,1,get(lastframe),0);

mul(ypos,frame,frameheight);

txtadd(crop,'0|',get(ypos),'|',get(framewidth),'|',get(frameheight));

delayedcall(0.02, if(loaded, hotspot_animate()) );

</action>

<!-- showtxt_name(get(name),get(text),get(ath),get(atv)); -->

<action name="showtxt_name">

if(view.fovmax == 170,

delayedcall(4.5,

txtadd(hotname,'hotsoptname_',%1);

addhotspot(get(hotname));

set(hotspot[get(hotname)].html,%2);

set(hotspot[get(hotname)].ath,%3);

set(hotspot[get(hotname)].atv,%4);

set(hotspot[get(hotname)].onclick,get(onclick));

hotspot[get(hotname)].loadstyle(hotspotname);

);

,

txtadd(hotname,'hotsoptname_',%1);

addhotspot(get(hotname));

set(hotspot[get(hotname)].html,%2);

set(hotspot[get(hotname)].ath,%3);

set(hotspot[get(hotname)].atv,%4);

set(hotspot[get(hotname)].onclick,get(onclick));

hotspot[get(hotname)].loadstyle(hotspotname);

);

</action>

最后就完成了哈哈哈哈

以上是 vue集成krpano实现在里面加文字 的全部内容, 来源链接: utcz.com/z/375875.html

回到顶部