1.首先将tour.js和tour.swf放入项目文件夹
2.新建一个vtour.html
<!DOCTYPE html>
<html>
<head>
<title>全景漫游</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, viewport-fit=cover" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=edge" />
<script src="tour.js"></script>
<style>
@-ms-viewport { width:device-width; }
@media only screen and (min-device-width:800px) { html { overflow:hidden; } }
html { height:100%; }
body { height:100%; overflow:hidden; margin:0; padding:0; font-family:Arial, Helvetica, sans-serif; font-size:16px; /*color:#FFFFFF;*/ background-color:#000000; }
</style>
</head>
<body class="gray-bg">
<div id="pano" style="width:100%;height:100%;">
<noscript><table style="width:100%;height:100%;"><tr style="vertical-align:middle;"><td><div style="text-align:center;">ERROR:<br/><br/>Javascript not activated<br/><br/></div></td></tr></table></noscript>
<script>
embedpano({swf:"tour.swf", xml:"vtour.xml", target:"pano", html5:"auto", mobilescale:1.0, passQueryParameters:true});
</script>
</div>
</body>
</html>
3.新建一个vtour.xml文件
<!--版本version 标题title-->
<krpano version="19.15" title="mmcike">
<!-- 默认视角fov 最小最大视角限制fovmin fovmax-->
<view fov="120" fovmin="90" fovmax="140" />
<!--预览 类型为网格型的 空间形状为CUBE立方体 每个网格的尺寸 长32 宽32
总尺寸512x512 则网格个数 水平个数512/32 垂直512/32
网格边框的颜色0xCCCCCC 网格面积的颜色0xFFFFFF 网格交点的颜色0xff0000
-->
<preview type="grid(CUBE,32,32,512,0xCCCCCC,0xFFFFFF,0xff0000);" />
</krpano>
4.运行效果图