【问题标题】:AFrame / AR.js Positioning - Can not get the X axis to changeAFrame / AR.js 定位 - 无法改变 X 轴
【发布时间】:2021-05-27 22:02:28
【问题描述】:

我正在尝试使用 Lat 和 Long Co-ords 创建基于 Web 的基于位置的标记。为此,我使用 A-frame 和 AR.js。我目前遇到的问题是我似乎无法改变 X 轴,但 Y 工作正常。

这是我如何设置框架元素的样式

    <a-scene 
       vr-mode-ui="enabled: false;" 
       arjs="sourceType: webcam; debugUIEnabled:false;"
       embedded
    >
        <a-plane
            position="0 0 0" 
            rotation="0 0 0" 
            width="50" 
            height="25" 
            color="#7BC8A4" 
            look-at="[gps-camera]" 
            gps-entity-place="latitude: 53.761385; longitude: -2.72117;">
        </a-plane>
        <a-image
            position="0 0 0"  
            width="15" 
            height="15"
            look-at="[gps-camera]" 
            src="images/building.png"
            gps-entity-place="latitude: 53.761385; longitude: -2.72117;">
        </a-image>
        <a-text 
            position="-10 27.5 0"  
            value="C & T Building" 
            color="black" 
            width="100"
            look-at="[gps-camera]" 
            gps-entity-place="latitude: 53.761385; longitude: -2.72117;">
        </a-text>
        <a-text 
            position="10 20 0"  
            value="900M" 
            color="black" 
            width="150"
            look-at="[gps-camera]"
            gps-entity-place="latitude: 53.761385; longitude: -2.72117;">
        </a-text>

        <a-camera gps-camera rotation-reader></a-camera>
    </a-scene>

此外,任何 AR 调试建议都会很好。目前正在将网站上传到 Netlify,然后在我的手机上进行测试。

【问题讨论】:

    标签: javascript css augmented-reality aframe ar.js


    【解决方案1】:

    解决方案是将两个&lt;a-text&gt; 标签包装在&lt;a-entity&gt; 标签中,&lt;a-image&gt; 标签也是如此

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-03-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多