2017-09-29 47 views
1

在我的AR.JS示例https://github.com/ybinstock/aframe_ar(github)https://ybinstock.github.io/aframe_ar(live site)上,我得到了附在圖像中的這兩個框。如何使用AR.js刪除警報的trackingBackend和markersAreaEnabled?

enter image description here

這裏是我的AFRAME現場

<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> 

回答

1

通過CSS來隱藏他們的最簡單方法。或使用debugUIEnabled:虛假ar.js景系統

我希望這有助於

+0

謝謝,我用CSS並解決了問題 –

+0

'ar.js場景系統'對初學者來說並不意味着什麼。請參閱我的回答以獲得清晰的解釋。 – namklabs

2

您可以關閉調試垃圾用的配置選項。它沒有記錄(這是非常令人沮喪的),但是我在查看其他AR.js項目的例子時發現它。您需要將'debugUIEnabled:false'添加到<a-scene>元素的arjs屬性中。這裏有一個例子:

<a-scene embedded arjs='sourceType: webcam; debugUIEnabled: false;'> 
    ... your a-frame markup ... 
</a-scene> 

僅供參考,您不需要embedded屬性,也不需要在sourceType: webcam。一個基本的一個幀的場景,只有禁用調試,應該是這樣的:

<a-scene arjs="debugUIEnabled: false;"> 
    ... your a-frame markup ... 
</a-scene> 

的AR.js自述列出了您可在arjs屬性使用屬性是在這裏:https://github.com/jeromeetienne/AR.js/tree/master/aframe

本文檔不請確切地提及您如何使用這些配置選項。巨大的監督。但答案是你把它們放在<a-scene>標籤上的arjs屬性中。

我知道你可以隱藏調試的東西與CSS,但這是真正的隱藏它的正確方法。我希望這有助於!