如何解决AR.js 全景图中的标记问题
我正在使用 AR.js 构建 AR 全景图,并希望标记漂浮在地标上方。我尝试了 sample provided in AR.js git 但它总是相同的错误,当我移动相机时,标记与对象/地标不同步,它没有停留在正确的位置。一开始,我认为我的坐标是错误的,但事实并非如此,我尝试了 GPS 模式和模拟/强制定位模式(使用手持 Garmin GPS12 仔细检查我的位置)以获取用户位置。
这是一个 video of the problem(我们看到标记没有停留在方尖碑上方)。
这是我的 HTML 代码,与示例非常接近。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>GeoAR.js demo</title>
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-look-at-component@0.8.0/dist/aframe-look-at-component.min.js"></script>
<script src="https://raw.githack.com/AR-js-org/AR.js/3.3.1/aframe/build/aframe-ar-nft.js"></script>
</head>
<body style="margin: 0; overflow: hidden;">
<a-scene
vr-mode-ui="enabled: false"
embedded
arjs="sourceType: webcam; debugUIEnabled: false;"
>
<!-- Obélisque : https://geohack.toolforge.org/geohack.php?language=fr&pagename=Ob%C3%A9lisque%20de%20Louxor¶ms=48.8655_N_2.3211_E_scale:8000 -->
<!-- WGS84 48.8655°,2.3211° -->
<a-image
src="location.png"
look-at="[gps-camera]"
scale="14 14 14"
gps-entity-place="latitude: 48.8655; longitude: 2.3211;"
></a-image>
<a-text
value="Obélisque de Louxor"
look-at="[gps-camera]"
scale="14 14 14"
position="0 40 0"
align="center"
gps-entity-place="latitude: 48.8655; longitude: 2.3211;"
></a-text>
<!-- force GPS coordinates -->
<!-- GPS12: 48.86650 2.32210 80M -->
<!-- Apple Map: 48.866766 2.322606 -->
<a-camera gps-camera="simulateLatitude: 48.8665; simulateLongitude: 2.3221; simulateAltitude: 80m;" rotation-reader></a-camera>
<!-- <a-camera gps-camera rotation-reader></a-camera> -->
</a-scene>
</body>
</html>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。