MARKERS
=======

Picture markers (hiro, kanji and your own) and barcode markers are all tracked by AR.js. Print them out, or show
them on another screen (a phone or tablet works well). Leave a white margin around the black border.

  marker_hiro.png       world.addMarker({ type: 'hiro' })
  marker_kanji.png      world.addMarker({ type: 'kanji' })
  barcodes/barcode_N.png  world.addMarker({ type: 'barcode', value: N })     (N = 0 to 63)
  marker_custom.png     world.addMarker({ type: 'pattern', url: '../../markers/patt.custom' })

The hiro and kanji patterns are built into the library, so you don't need patt.hiro or patt.kanji (they're here in
case you want them for something else).


MAKING YOUR OWN PICTURE MARKER
------------------------------

1. Make a square image for the middle of your marker, WITHOUT the black border (the generator adds it).
   Simple, bold, high-contrast shapes work best. Avoid designs that look the same when they're turned
   (e.g. a plain circle) - the camera needs to be able to tell which way up the marker is.
   blank_ar_template.png shows the size and the border.

2. Open the AR.js marker generator:
   https://ar-js-org.github.io/AR.js/three.js/examples/marker-training/examples/generator.html

3. Upload your image. Leave the pattern ratio at 0.50 (the size of the black border the library expects).

4. Download the marker (PNG - this is what you print) and the pattern file (.patt - this is what the code uses).
   Put the .patt file in your project.

5. In sketch.js:
       let myMarker = world.addMarker({ type: 'pattern', url: 'myMarker.patt' });
   The url is relative to index.html.


BARCODE MARKERS
---------------

Barcode markers are 3x3 grids of black and white squares inside a black border. They are faster to find than
picture markers and having lots of them doesn't slow tracking down, so use them when you need many markers.
The 64 of them in 'barcodes' are numbered 0 to 63. (index.html must have 'detectionMode: mono_and_matrix;
matrixCodeType: 3x3' in its <a-scene> - the example templates already do.)

To print a set of them at a chosen size, with a label under each, open print.html (in this folder) in a browser.
You can also link to a set directly, e.g. print.html?markers=1-8&size=15&copies=2&labels=Welcome,Crystal,Key


TIPS
----

- Markers must be flat, not bent, and not shiny (glare hides the pattern). Matte paper works best.
- Good, even lighting helps a lot. Dim rooms make tracking jittery.
- The whole black border has to be visible - a finger over the edge makes the marker disappear.
- Bigger markers can be tracked from further away.
