krpano VR模式(中文汉化版)

krpano 1.19支持了Web VR功能,允许以VR的方式查看全景图,配合上VR设备可以实现VR效果。

 

krpano VR模式(中文汉化版)_第1张图片

 

在VR方式查看时,可以对VR进行设置,界面如下

krpano VR模式(中文汉化版)_第2张图片

 

可以发现设置界面为全英文界面,对于国内用户不够友好,因此在国内做项目时,需要进行汉化。

 

在汉化时,我们只需要找到Plugin目录下的WebVR.xml文件,所有的设置文本信息被保存在了该xml文件中,根据需要汉化相应的英文即可。

汉化后如下:

 

krpano VR模式(中文汉化版)_第3张图片

 

已经汉化的WebVR.xml下载


	

		
		tervr();"
		        onexitvr="webvr_onexitvr();"
		        />

		
		
		
			
			
			
			
			
			
			
		


		
		


		
		
			if(webvr.isenabled,
				if(%1 != null, set(vr_aclk_timeout, %1), set(vr_aclk_timeout, 2000));
				copy(vr_aclk_t1, timertick);
				set(vr_aclk_waiting, true);
				copy(vr_aclk_hotspot, name);
				set(hotspot[vr_cursor].crop,'0|0|80|80');

				asyncloop(vr_aclk_waiting AND vr_aclk_hotspot == name,
					sub(dt, timertick,vr_aclk_t1);

					if(!hovering,
						set(vr_aclk_waiting, false);
						set(hotspot[vr_cursor].crop,'0|0|80|80');
					  ,
						div(f, dt, vr_aclk_timeout);
						mul(f, 16);
						roundval(f);
						Math.min(f, 16);
						mul(f, 80);

						txtadd(hotspot[vr_cursor].crop,get(f),'|0|80|80');

						
						sub(dt, 100);
						if(dt GT vr_aclk_timeout,
							set(vr_aclk_waiting,false);
							set(hotspot[vr_cursor].crop,'0|0|80|80');
							
							onclick();
						  );
					  );
					);
			  );
		


		
		


		
		
			webvr.loadsettings();
			delayedcall(0.5, tween(layer[webvr_enterbutton].alpha,1.0); );
		
		
		
		
			if(webvr.isfake AND device.desktop AND webvr.havesettings == false,
				
				set(webvr.mobilevr_lens_overlap, 1.0);
				set(webvr.mobilevr_lens_fov, 96.0);
				set(webvr.mobilevr_lens_dist, 0.0);
				set(webvr.mobilevr_lens_dist2, '1|0|0|0');
				set(webvr.mobilevr_lens_ca, 0.0);
				set(webvr.mobilevr_lens_vign, 100);
			  ,
				set(ask_user_for_screensize,true);
			  );
		


		
			tween(layer[webvr_enterbutton].alpha,0,0);

			webvr_showbuttons();
			webvr_hide_all_non_vr_layers();

			
			if(webvr.ismobilevr == true AND !webvr.isfake AND ask_user_for_screensize == true AND webvr.mobilevr_screensize == 'auto',
				set(ask_user_for_screensize, false);
				vr_setup();
			  );
			if(webvr.isfake,
				webvr_show_fakemode_info(true);
			  );
		


		
			stopdelayedcall(vr_button_fadeout);

			tween(layer[webvr_enterbutton].alpha,1);
			tween(layer[webvr_exitbutton].alpha,0);
			tween(layer[webvr_setupbutton].alpha,0);
			
			webvr_show_fakemode_info(false);

			webvr_restore_layers();
		


		
			for(set(i,0), i LT layer.count, inc(i),
				copy(lr, layer[get(i)]);
				if(lr.vr !== true,
					copy(lr.vr_backup_visible, lr.visible);
					set(lr.visible, false);
				  );
			  );
		

		
			for(set(i,0), i LT layer.count, inc(i),
				copy(lr, layer[get(i)]);
				if(lr.vr_backup_visible,
					copy(lr.visible, lr.vr_backup_visible);
					delete(lr.vr_backup_visible);
				  );
			  );
		
		
		
			if('%1' == 'true',
				addlayer(webvr_fakemode_info);
				set(layer[webvr_fakemode_info].url, '%SWFPATH%/plugins/textfield.swf');
				set(layer[webvr_fakemode_info].keep, true);
				set(layer[webvr_fakemode_info].align, 'bottom');
				set(layer[webvr_fakemode_info].y, 80);
				set(layer[webvr_fakemode_info].background, false);
				set(layer[webvr_fakemode_info].css, 'color:#FFFFFF;text-align:center;');
				set(layer[webvr_fakemode_info].html, '这是在web端模拟的VR场景,请使用VR头戴装备和移动设备来进行观看。');
			  ,
				removelayer(webvr_fakemode_info);
			  );