AR.js Basic Scene: Image.png appears on the UI

Viewed 125

Sorry in advance, I am a complete beginner regarding programming, but I cant seem to find an answer to my problem. I made this basic setup from AR.js:

<!doctype HTML>
<html>
<script src="https://aframe.io/releases/1.2.0/aframe.min.js"></script>
<script src="https://rawgit.com/donmccurdy/aframe-extras/master/dist/aframe-extras.loaders.min.js"></script>
<script src="https://cdn.rawgit.com/jeromeetienne/AR.js/1.5.0/aframe/build/aframe-ar.js"> </script>
  <a-assets>
  <a-asset-item id="rub" src="models/rubcube.gltf"></a-asset-item>
  </a-assets>
    <body style='margin : 0px; overflow: hidden;'>
    
    <a-scene arjs="debugUIEnabled: false;">
        
          <a-marker-camera preset="hiro"> 
            <a-entity 
                      gltf-model="#rub"
                      scale=" 0.5 0.5 0.5">
            </a-entity>
          <a-entity camera></a-entity>
      </a-marker-camera>
    </a-scene>
  </body>
</html>

The problem I get sooner or later with every AR code is that the session starts not with a camera but with a Image. The Image is the png file that is used for the display of the gltf model. When I move the marker in front of the camera the Image disappears and I can see the camera. The marker tracking itself is working.

0 Answers
Related