小程序/Html5/Vue 实现全景图播放功能
三种方案,分别适用小程序项目 H5项目 Vue项目,请根据项目场景选择合适方案展示全景图
方案一:使用小程序全景图插件
注意事项:建议插件使用2.0.3版本,全景图分辨率控制在2048*1024
方案二:Html5全景图
适用场景:兼容移动端和PC端,也可以用于小程序外链H5全景图
引用的关键资源:three.min.js和photo-sphere-viewer.min.js
Demo可在我的github下载:https://github.com/Summer-Lola/Panorama
Demo使用须知:
运行环境:要放在PHP环境或node环境才能运行,
比如可以 把demo里面的文件复制粘贴到vue项目中访问
Html5全景图h5.html代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compa