在我的 AR.JS 示例中 https://github.com/ybinstock/aframe_ar (github) https://ybinstock.github.io/aframe_ar (现场),我在附图中看到了这两个盒子。
这是我的框架场景
<a-scene embedded arjs>
<a-assets>
<a-asset-item id="drone" src="busterDrone/busterDrone.gltf"></a-asset-item>
<a-asset-item id="helmet" src="damagedHelmet/damagedHelmet.gltf"></a-asset-item>
<a-asset-item id="skull" src="skull_downloadable/scene.gltf"></a-asset-item>
</a-assets>
<a-marker-camera preset='hiro'>
<a-entity gltf-model-next="#drone"></a-entity>
</a-marker-camera>
</a-scene>
最佳答案
您可以使用配置选项关闭调试垃圾。它没有记录(这很令人沮丧),但我在查看其他 AR.js 项目的示例时发现了它。您需要在 arjs
中添加 'debugUIEnabled: false' <a-scene>
上的属性元素。这是一个例子:
<a-scene embedded arjs='sourceType: webcam; debugUIEnabled: false;'>
... your a-frame markup ...
</a-scene>
仅供引用,您不需要
embedded
属性,也不需要 sourceType: webcam
.仅禁用调试的基本 a-frame 场景如下所示:<a-scene arjs="debugUIEnabled: false;">
... your a-frame markup ...
</a-scene>
AR.js 自述文件列出了您可以在
arjs
中使用的属性属性在这里:https://github.com/jeromeetienne/AR.js/tree/master/aframe该文档未准确提及您如何使用这些配置选项。巨大的疏忽。但答案是你把它们放在
arjs
<a-scene>
上的属性标签。我知道你可以用 CSS 隐藏调试的东西,但这确实是隐藏它的正确方法。我希望这会有所帮助!
关于javascript - 如何使用 AR.js 删除警报 'trackingBackend' 和 'markersAreaEnabled'?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46486978/