显示平面的框架图像

问题描述 投票:0回答:1

我试图使用和跟踪一个在二维码中使用的标记,当标记被相机捕捉到时,它在上面显示一个图像。我的代码能够识别标记并显示图像,但图像是扁平的,它只显示一条细线,即使我已将宽度和高度设置为4(米)。以下是我的源代码和目前相机上图像显示的截图。我用红色圈出了与相机上的图像相对应的线条。

<!-- we add detectionMode and matrixCodeType to tell AR.js to recognize barcode markers -->
<a-scene embedded="" vr-mode-ui="enabled: false" arjs="sourceType: webcam; debugUIEnabled: false; detectionMode: mono_and_matrix; matrixCodeType: 3x3;">

<a-assets>
    <a-asset-item id="animated-asset" src="https://raw.githubusercontent.com/nicolocarpignoli/nicolocarpignoli.github.io/master/ar-playground/models/CesiumMan.gltf"></a-asset-item>
</a-assets>

<a-marker type="barcode" value="7">
    <a-image src="https://ewouk.com.au/wp-content/uploads/2020/04/cropped-Screen-Shot-2020-04-10-at-12.48.46-pm.png" width="4" height="4"></a-image>
</a-marker>

<a-marker id="animated-marker" type="barcode" value="6">
    <a-entity animation-mixer="" gltf-model="#animated-asset" scale="2 2 2">
    </a-entity>
</a-marker>

<a-entity camera=""></a-entity>
</a-scene>

截图。

screenshot

html augmented-reality qr-code aframe markers
1个回答
1
投票

我想你需要旋转图像(类似于......)。<a-image rotation="90 0 0" ...).

© www.soinside.com 2019 - 2024. All rights reserved.