krpano设置文字 krpano设置文字

krpano设置文字

添加文字热点,调用方法:


<hotspot name="spot1" url="animatedhotspot_white.png" onloaded="do_crop_animation(64,64, 60);add_all_the_time_tooltip_for_VR()" ath="-15" atv="-12" onclick="loadscene(get(linkedscene))" text="自定义文字"/>


添加方法secene外


 <action name="add_all_the_time_tooltip_for_VR">
	
	 txtadd(tooltipname, 'vrtooltip_', get(name));
	 addhotspot(get(tooltipname)); 
	 set(hotspot[get(tooltipname)].type,text);
	 copy(hotspot[get(tooltipname)].edge,hotspot[get(name)].edge);
	 copy(hotspot[get(tooltipname)].distorted,hotspot[get(name)].distorted);
	 copy(hotspot[get(tooltipname)].ath,hotspot[get(name)].ath);
	 copy(hotspot[get(tooltipname)].atv,hotspot[get(name)].atv);
	 set(hotspot[get(tooltipname)].oy,-50);
	 set(hotspot[get(tooltipname)].ox,0);
	 set(hotspot[get(tooltipname)].vcenter,true);
         <!-- pr11版本不能将vcenter设置为true -->
	 set(hotspot[get(tooltipname)].padding,10);
         set(hotspot[get(tooltipname)].mipmapping,true);
         set(hotspot[get(tooltipname)].oversampling,2);
	 set(hotspot[get(tooltipname)].bg,true);
	 set(hotspot[get(tooltipname)].bgcolor,0x000000);
	 set(hotspot[get(tooltipname)].bgroundedge,5);
	 set(hotspot[get(tooltipname)].bgalpha,0.65);
	 set(hotspot[get(tooltipname)].bgborder,0);
	 set(hotspot[get(tooltipname)].bgshadow,'0 0 0 0x000000 0');
	 set(hotspot[get(tooltipname)].css,'text-align:left; color:#FFFFFF; font-family:MicrosoftYahei; font-size:24px;');
	 if(device.mobile,set(hotspot[get(tooltipname)].css,'text-align:center; color:#FFFFFF; font-family:MicrosoftYahei; font-weight:bold; font-size:24px;');
	 );
	 set(hotspot[get(tooltipname)].txtshadow,'0 0 0 0x000000 0');
 
	 if(text == '' OR text === null,
 
		 copy(hotspot[get(tooltipname)].html,scene[get(linkedscene)].title),
		 copy(hotspot[get(tooltipname)].html,text);
 
	 ); 
 
	 set(hotspot[get(tooltipname)].enabled,false); 
 
	 if(lp_running == false,
	 	set(hotspot[get(tooltipname)].visible,true); 
	 	, 	
	 	if(!webvr.isenabled,
	 	  if(lp_running == true,
		 	set(hotspot[get(tooltipname)].visible,false); 
		 	set(hotspot[get(tooltipname)].mark2,true);
	 	   );
	 	  );
	 	);
 
	 if(hotspot[get(name)].normal == false, 
 
		set(hotspot[get(tooltipname)].normal,false);
		set(hotspot[get(tooltipname)].onloaded,
			if(webvr.isenabled,
				set(visible,false);
				,	
				if(lp_running == false OR lp_running == null OR lp_running === null,  
					set(visible,true);
					);
				);
	       );
 
	 	);
</action>
调用方法:




分享本文至:

评论 0

挤眼 亲亲 咆哮 开心 想想 可怜 糗大了 委屈 哈哈 小声点 右哼哼 左哼哼 疑问 坏笑 赚钱啦 悲伤 耍酷 勾引 厉害 握手 耶 嘻嘻 害羞 鼓掌 馋嘴 抓狂 抱抱 围观 威武 给力
提交评论

清空信息
关闭评论