AR.js: AR.js not working anymore? Hiro and Barcode markers not recognised
I have used AR.js a lot in the past, but now the same code that used to work appears to no longer be working.
I started with this code:
<a-scene embedded arjs='sourceType: webcam; detectionMode: mono_and_matrix; matrixCodeType: 3x3; debugUIEnabled: false;'>
<!-- handle 1 marker -->
<a-marker type='barcode' value='1'>
<a-gltf-model src="./figure/BoomBox.glb" scale="0.5 0.5 0.5"></a-gltf-model>
</a-marker>
<!-- add a simple camera -->
<a-entity camera></a-entity>
</a-scene>
and the camera was not recognising the marker, so I went all the way back to the original code and using a hiro marker: https://aframe.io/blog/arjs/
But that didn’t work still, so I tried the code here: https://github.com/jeromeetienne/AR.js/issues/492
But that didn’t work either.
This ‘working example’ doesn’t work (for me at least): https://glitch.com/~actually-macaroon
The only version currently working for me appears to be the playground: https://webxr.io/webar-playground/app/
Can someone help? What is different about the playground example that means it is recognising the hiro marker and none of the others are for me? The rest of the code works - the camera is triggered, and I can see the scene in the inspector.
Many thanks in advance for any help.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (3 by maintainers)
you are serving this HTML from file system (I guess you opened it double-clicking on file from the file system). Look at the error on the screenshot, at the top (“A-FRAME:error”).
You have to serve this file using a server (also local) via https.
@EdieJoMurray I can not test the second example at the moment but i can confirm that the first basic example is working very well. It works also without running the http server. Maybe an issue with the browser used? Try to delete the browser cache and restarting the pc.