I need some help with using custom AR markers with AR.js. We have been running into some problems getting objects to initialize over the markers, after downloading the .patt file from the custom markers generator page. Everything is being tested client side on a Node.js server, but every time the webcam turns on nothing appears over an image of a python logo.
Code below:
<html>
<head>
<script src="https://aframe.io/releases/0.8.0/aframe.min.js"></script>
<!-- <script src="https://cdn.rawgit.com/jeromeetienne/AR.js/1.5.0/aframe/build/aframe-ar.js"> </script> -->
<script src="aframe-ar.js"></script>
</head>
<body style="margin : 0px; overflow: hidden;">
<a-scene embedded arjs="sourceType: webcam;">
<a-marker preset="custom" type="pattern" url="pattern-marker.patt">
<a-box position="0 0.5 0" material="opacity: 0.5;"></a-box>
</a-marker>
</a-scene>
</body>
</html>
This conditional is in that aframe-ar.js file that is local to add the custom preset for the python image marker. We are using Google Chrome.
else if( _this.data.preset === 'custom' ){
markerParameters.type = 'pattern'
markerParameters.patternUrl = _this.data.patternUrl;
markerParameters.markersAreaEnabled = false
}
I have just been using a local Node.js server to test, also I should mention that the default Hiro marker works but the custom image markers don't.
If anyone can point me in the right direction there is a reward! Contact me for details. Cheers.