全景显示图片功能的源码及相关说明
来源:互联网 发布:影视美术设计考研知乎 编辑:程序博客网 时间:2024/06/10 04:39
最近项目需要,需要将图片 全景 360度显示,网上查找了相关资料,发现国外有一个开源的库可以使用
正面是使用 json的配置文件的相关说明,利用下面的配置文件可以达到,传感器的许多功能的实现。
{ "urlBase": "file:///sdcard/files", //URL base where the files are //The options are res:// for application resources and file:// for file system (this feature will be improved to support the http protocol) "type": "spherical", //Panorama type: [spherical, spherical2, cubic, cylindrical] "sensorialRotation": false, //Automatic rotation using sensors [true, false] <Optional> "scrolling": //Scrolling section <Optional> { "enabled": false //Enable scrolling feature [true, false] <Optional> }, "inertia": //Inertia section <Optional> { "enabled": false, //Enable inertia feature [true, false] <Optional> "interval": 3 //Inertia's interval in seconds <Optional> }, "accelerometer": //Accelerometer section <Optional> { "enabled": false, //Enable the accelerometer feature [true, false] <<a href="www.yidin.net">Optional</a>> "interval": 0.033, //Update interval of accelerometer (this value must be calculated as 1/frequency) <Optional> "sensitivity": 10.0, //Sensitivity of the accelerometer <Optional> "leftRightEnabled": true, //Enable the direction of movement with the accelerometer (left/right) <Optional> "upDownEnabled": false //Enable the direction of movement with the accelerometer (up/down) <Optional> }, "images": //Panoramic images section //A property can be a name e.g. preview.jpg, preview or URL e.g. file:///sdcard/files/preview.jpg, res://raw/preview //if a property only have a name, the real path will be the urlBase + image name { "preview": "preview.jpg", //Preview image name or URL (this <a href="www.yidin.net">option</a> will be used with http protocol) <Optional> "image": "pano.jpg" //Panoramic image name or URL for spherical, spherical2 and cylindrical panoramas "front": "front.jpg", //Front image name or URL for cubic panorama (only use with cubic panorama) "back": "back.jpg", //Back image name or URL for cubic panorama (only use with cubic panorama) "left": "left.jpg", //Left image name or URL for cubic panorama (only use with cubic panorama) "right": "right.jpg", //Right image name or URL for cubic panorama (only use with cubic panorama) "up": "up.jpg", //Up image name or URL for cubic panorama (only use with cubic panorama) "down": "down.jpg" //Down image name or URL for cubic panorama (only use with cubic panorama) }, "camera": //Camera settings section <Optional> { "vlookat": 0, //Initial vertical position [-90, 90] "hlookat": 0, //Initial horizontal position [-180, 180] "atvmin": -90, //Min vertical position [-90, 90] "atvmax": 90, //Max vertical position [-90, 90] "athmin": -180, //Min horizontal position [-180, 180] "athmax": 180 //Max horizontal position [-180, 180] }, "hotspots": [ //Hotspots section (this section is an array of hotspots) <Optional> { "id": 1, //Hotspot identifier (long) "atv": 0, //Vertical position [-90, 90] "ath": 0, //Horizontal position [-180, 180] "width": 0.08, //Width "height": 0.08, //Height "image": "hotspot.png" //Image name or <a href="www.yidin.net">URL</a> } ]}
从官网还可以获取到源码,用于自己的定制的开发,比如,全景图片的放大并多次切换,拖动的间隔都要在源码里进行相关的二次开发,使其达到自己想要的 效果。
注意图片要符合项目的图片尺寸,要是 512的倍数。
更多相关的资料请到我的博客:www.yidin.net 留言
开源库地址如下:http://www.yidin.net/discuz/forum.php?mod=viewthread&tid=185&extra=page%3D1
欢迎各位同学加入 android 技术二群 222392467
<script type="text/javascript"><!--google_ad_client = "ca-pub-1944176156128447";/* cnblogs 首页横幅 */google_ad_slot = "5419468456";google_ad_width = 728;google_ad_height = 90;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 全景显示图片功能的源码及相关说明
- 全景图片相关
- CKEditor的基本使用及上传图片功能说明
- GPS功能的相关说明
- Android 360度全景图片 源码
- FoxBPM任务代理功能及相关接口说明
- LCD 显示相关的参数说明
- 上传图片及生成小图片功能源码
- BMP图片的数据存储格式说明及显示数据的转换
- ue4 输出360全景图片及视频的几个方式对比及注意点
- C#+AE实现类似IDentify功能及对高亮显示相关接口的总结
- 全景图片
- 系统功能显示相关的设置
- Qomo的进展及相关说明~
- Qomo的进展及相关说明~
- Eucalyptus EE的介绍及功能说明
- Eucalyptus EE的介绍及功能说明
- Google VR全景图片与视频功能开发详解
- Apache Ant运行时Unable to locate tools.jar解决方法
- Linux进程状态(ps aux)
- 怎么样的爱情,才经得起时间的考验?
- 关联规则R语言实现
- 穿短裙露事业线是种能力
- 全景显示图片功能的源码及相关说明
- POJ1321:棋盘问题
- 《怪诞行为学2》读书笔记,第一章 金钱的诱惑:为什么巨额奖金带不来高业绩?
- 将Excle表格转换成insert语句
- Android ListView 可拖拽Item 1 - 创建浮动Item
- HD Piggy-Bank完全背包
- win7下vmware的host-only设置方法
- java的property配置文件的用法
- 杭电HDOJ 1042 解题报告