首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >"PhotoSphereViewer:无效XMP数据“和"WebGL: INVALID_VALUE: texImage2D:坏图像数据”

"PhotoSphereViewer:无效XMP数据“和"WebGL: INVALID_VALUE: texImage2D:坏图像数据”
EN

Stack Overflow用户
提问于 2021-02-04 03:29:01
回答 1查看 102关注 0票数 0

我使用照片球面查看器来显示全景照片,就像facebook所做的那样,并且有一些问题。

这是我的密码:

这是我的密码:

代码语言:javascript
复制
<script src="https://cdn.jsdelivr.net/npm/promise-polyfill@8.1.3/dist/polyfill.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/uevent@2.0.0/browser.js"></script>
<script src="https://cdn.jsdelivr.net/npm/three@0.115.0/build/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/photo-sphere-viewer@4/dist/photo-sphere-viewer.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photo-sphere-viewer@4/dist/photo-sphere-viewer.css">
<div id="photosphere"></div>
<script>
new PhotoSphereViewer.Viewer({
  panorama: 'https://terrafrost.sfo2.digitaloceanspaces.com/20200618_131549.jpg',
  container: 'photosphere',
  caption: 'Parc national du Mercantour <b>&copy; Damien Sorel</b>',
  loadingImg: 'https://terrafrost.sfo2.cdn.digitaloceanspaces.com/photosphere-logo.gif',
  defaultLat: 0.3,
  touchmoveTwoFingers: true,
  mousewheelCtrlKey: true,
});
</script>

当我运行这段代码时,会遇到JS控制台中的错误:

  • PhotoSphereViewer:无效的XMP数据(来自psv.js:11)
  • WebGL: INVALID_VALUE: texImage2D:坏图像数据(来自three.min.js:130)

对于我做错了什么或者我需要做什么有什么想法吗?

谢谢!

EN

回答 1

Stack Overflow用户

发布于 2021-12-11 16:51:05

你的全景文件不是公开的,所以我不能给出一个完整的答案。但是错误说,嵌入的XMP数据是不连贯的。可以使用useXmpData: false选项禁用XMP解析。

有关XMP数据的更多详细信息,请参见https://photo-sphere-viewer.js.org/guide/cropped-panorama.html

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66038972

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档