如何解决AR.js NFT图片跟踪未在飞机上显示文本
我目前正在研究AR.js,我正在使用NFT图像跟踪制作AR网络,但是在a平面上显示a文本时遇到了问题。文字不会显示在飞机的前面,而是显示在飞机的后面
有人可以告诉我如何将文字正确放置在飞机上吗? 对不起,我的英语。
这是我的源代码:
<script src='https://cdn.jsdelivr.net/gh/aframevr/aframe@1c2407b26c61958baa93967b5412487cd94b290b/dist/aframe-master.min.js'>
</script>
<script src='https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar-nft.js'></script>
<script src="https://unpkg.com/aframe-text-geometry-component@^0.5.0/dist/aframe-text-geometry-component.min.js">
</script>
<style>
.arjs-loader {
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
background-color: rgba(0,0.8);
z-index: 9999;
display: flex;
justify-content: center;
align-items: center;
}
.arjs-loader div {
text-align: center;
font-size: 1.25em;
color: white;
}
</style>
<body style='margin : 0px; overflow: hidden;'>
<div class="arjs-loader">
<div>Loading,please wait...</div>
</div>
<a-scene vr-mode-ui='enabled: false;' renderer="logarithmicDepthBuffer: true;" embedded
arjs='trackingMethod: best; sourceType: webcam; debugUIEnabled: false;'>
<a-nft type='nft' url='./book/markers/agamapelacur' smooth='true' smoothCount='10' smoothTolerance='0.01'
smoothThreshold='5'>
<a-plane color="cyan" rotation="-90 0 0" scale="200 275 200" position="50 0 -200" material="transparent: true; opacity: 0.9">
<a-entity scale="0.19 0.19 0.19" material="transparent: false">
<a-text value="Agama Pelacur: Dramaturgi Transendental" anchor="center" align="center" color="red"
position="0 2 0.2" transparent: false></a-text>
<a-text value="Writers: Prof. Dr. Nur Syam,M.Si" anchor="center" align="left" color="red"
position="0 1.3 0.2"></a-text>
<a-text value="Sinopsis: lalalallalalalallalalallalalalalalallalallalalalalalalalalalalla"
color="red" anchor="center" align="left" position="0 0.75 0.2"></a-text>
<a-text value="Available: 5 copies" anchor="center" align="left" color="blue" position="0 -1.5 0.2">
</a-text>
</a-entity>
</a-plane>
</a-nft>
<a-entity camera></a-entity>
</a-scene>
</body>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。