javascript 360全景图使 js360全景图使用[触屏]
1、下载地址百度网盘 链接: http://pan.baidu.com/s/1hqvbyqo 密码: goew支持php哈,如果没有php 请改成xml文件
2、<!DOCTYPE html><html> <head> <title>室内</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="./index/3dview.css" media="all"> <script type="text/javascript" charset="utf-8" async="" src="./index/lxb.js"></script> <script type="text/javascript" src="./index/skin.js"></script> </head> <body onselectstart="return true;" ondragstart="return false;"> <div id="container" style="width:100%;height:100%;"> <div style="top: 0px; left: 0px; position: relative;"> </div> </div> <script type="text/javascript"> if (ggHasHtml5Css3D() || ggHasWebGL()) { pano=new pano2vrPlayer("container"); skin=new pano2vrSkin(pano); //全景图xml地址 pano.readConfigUrl('http://localhost/360images/xml.php'); } else{ alert("not support 360view"); } </script><div class="view_change"><a href="javascript:history.go(-1);">切换房间</a></div><a href="javascript:history.go(-1);" class="back360" style=""> </a></body></html>
3、xml.php<?phpheader('Content-Type: text/xml');//改怊眶峋$url_dir = dirname($_SERVER['REQUEST_URI']).'/';$images = array('qian.jpg','hou.jpg','zuo.jpg','you.jpg','shang.jpg','xia.jpg',);$titleurl_str = '';foreach($images as $key=>$value){ $titleurl_str .= ' tile'.$key.'url="'.$value.'" ';}//echo $titleurl_str;echo <<<str <panorama id="" hideabout="1"> <view fovmode="0" pannorth="0"> <start pan="5.5" fov="80" tilt="1.5" /> <min pan="0" fov="80" tilt="-90" /> <max pan="360" fov="80" tilt="90" /> </view> <userdata title="" datetime="2013:05:23 21:01:02" description="" copyright="" tags="" author="" source="" comment="" info="" longitude="" latitude="" /> <hotspots width="180" height="20" wordwrap="1"> <label width="180" backgroundalpha="1" enabled="1" height="20" backgroundcolor="0xffffff" bordercolor="0x000000" border="1" textcolor="0x000000" background="1" borderalpha="1" borderradius="1" wordwrap="1" textalpha="1" /> <polystyle mode="0" backgroundalpha="0.2509803921568627" backgroundcolor="0x0000ff" bordercolor="0x0000ff" borderalpha="1" /> </hotspots> <media /> <input tilesize="700" tilescale="1.014285714285714" $titleurl_str /> <autorotate speed="0.200" nodedelay="0.00" startloaded="1" returntohorizon="0.000" delay="5.00" /> <control simulatemass="1" lockedmouse="0" lockedkeyboard="0" dblclickfullscreen="0" invertwheel="0" lockedwheel="0" invertcontrol="1" speedwheel="1" sensitivity="8" /> </panorama>str;