前端使用photo-sphere-viewer.js 制作柱状全景图实践
2018-03-19 19:46
441 查看
1、需要引用的文件下载地址
国外下载比较慢,我都上传到自己百度云盘:
photoSphereViewer.min.css
three.min.js
D.min.js
doT.min.js
uEvent.min.js
photoSphereViewer.min.js
这里是官网API:photo-sphere-viewer官网
2、HTML文件
自己做的是移动端,详细的去官网看吧
国外下载比较慢,我都上传到自己百度云盘:
photoSphereViewer.min.css
three.min.js
D.min.js
doT.min.js
uEvent.min.js
photoSphereViewer.min.js
这里是官网API:photo-sphere-viewer官网
2、HTML文件
自己做的是移动端,详细的去官网看吧
<!DOCTYPE html> <html lang="zh-cmn-Hans"> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="IE=edge, chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,
minimum-scale=1, user-scalable=no"> <title>柱状全景图</title> <meta content="yes" name="apple-mobile-web-app-capable"> <meta content="yes" name="apple-touch-fullscreen"> <link rel="stylesheet" href="css/photoSphereViewer.min.css" inline> </head> <body> <!--全景图--> <div id="photosphere"></div> <script src="js/three.min.js"></script> <script src="js/D.min.js"></script> <script src="js/doT.min.js"></script> <script src="js/uEvent.min.js"></script> <script src="js/photoSphereViewer.min.js"></script> <script> var psv = PhotoSphereViewer({ container: 'photosphere', //直接写id值 panorama: rootURL+'img/bg-slide.png', //图片路径,要保证宽高2:1,才适合做柱状全景图 size: { //全景图显示大小 width: '100%', height: screen.availHeight }, default_long: 180, // 初始经度位置 default_lat: 0, // 初始纬度位置 max_fov: 100, // 最大缩放值 min_fov: 99, // 最小缩放值 default_fov: 100, // 默认缩放值,在1-179之间 latitude_range: [0,0],//禁止上下滑动 mousewheel: false, // 禁止鼠标滚轮缩放 theta_offset: 1000, //旋转速度 navbar: false, markers: [ //在图片中加图片表示,比如地图图标,对话 { id: 'image', longitude: -40, latitude: 0, image: rootURL+'img/dialog-1.png', width: 98, height: 92, anchor: 'bottom center' } ] });
//全景图加载完成后,显示提示和按钮 psv.on('panorama-loaded',function () { $('.hint-container').css('display','block'); $('.btn-container').css('display','block'); })
</script> </body> </html>
相关文章推荐
- Photo Sphere Viewer 全景图
- 前端模块化实践----使用webpack打包js代码
- 360全景图three.js与Photo-Sphere-Viewer-master 3D全景浏览开发
- 持续集成实践:使用Visual Studio 2010 Coded UI Test 制作能自动安装/卸载UI应用的程序
- 为前端开发人员制作的 Chrome 扩展 jsbeautifier
- 中文前端UI框架Kit(十三)使用RequireJs托管你的类库和js代码
- 前端开发者使用JS框架的三个等级
- [前端优化]使用Combres合并对js、css文件的请求
- 使用nlite制作集成驱动windows安装光盘及实践心得
- VMWare的Cloud Foundry实践(一):安装使用和第一个云端node.js程序
- JS脚本使用RAR制作安装包
- 前端开发者使用JS框架的三个等级
- 前端开发者使用JS框架的三个等级
- 前端优化:BigRender的textarea延迟渲染和关于LABjs的实践
- [转]为前端开发人员制作的 Chrome 扩展 jsbeautifier
- 使用JS制作弹出框的几个小问题
- 使用nlite制作集成驱动windows安装光盘及实践心得
- [前端优化]使用Combres合并对js、css文件的请求
- HTML5实践 -- 使用css制作时间 ICON
- [原创]使用js+xml制作的IE和FF都支持的树型菜单(程序不到4k哦)