How do I use Custom Marker with ar.js

I am trying to make a custom marker work in ar.js, sadly with no succes, was hoping somebody could help.

I have tried all of those guides:

Sadly it does not seem to work. weirdly enough, with the hiro Marker it still worked, eventhough the code doesn’t mention it… (I tried editing the .js file for the katherine-tutorial only).

<!doctype HTML>
  <script src="aframe.min.js"></script>            
  <script src="aframe-ar.js"></script>            
<script src="aframe-gif-shader.js"></script>   

  <body style="margin : 0px; overflow: hidden;">    
    <a-scene embedded arjs="debugUIEnabled: false">  
        <img id="asset" src="">
      <a-marker preset='custom' type="pattern" url='testpattern.patt'> 
      <a-entity geometry="primitive:plane;width:2;height:2;"
      position="0 0 0"
      rotation="-90 0 0"
      scale="0.5 0.5 0.5"
    <a-entity camera></a-entity>    

(Also I have a problem with, when i upload the same exact gif on my own webspace, the gif doesnt work anymore with that code, anyone knows why?)


Custom markers in ar.js require only to have the type and an url set:

<a-marker type="pattern" url="url/to/mypattern.patt">
  <a-entity myobject></a-entity>

You can check it out in this glitch using this image.

Leave a Reply

Your email address will not be published. Required fields are marked *