AR.js from version 3 has a new structure.
AR.js is coming in two, different builds. They are both maintained. They are exclusive.
The file you want to import depends on what features you want, and also which render library you want to use (A-Frame or three.js).
AR.js uses jsartoolkit5 for tracking, but can display augmented content with either three.js or A-Frame.
You can import AR.js in one version of your choice, using the
Import AFRAME version:
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar-nft.js">
Import three.js version:
<script src="https://raw.githack.com/AR-js-org/AR.js/master/three.js/build/ar-nft.js">
AR.js with Marker Tracking + Location Based AR:
Import AFRAME version:
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js">
Import three.js version:
<script src="https://raw.githack.com/AR-js-org/AR.js/master/three.js/build/ar.js">
If you want to import a specific version, you can do that easily replacing master with the version tag, e.g.:
<script src="https://raw.githack.com/AR-js-org/AR.js/3.0.0/aframe/build/aframe-ar-nft.js">
Some requirements and known restrictions are listed below:
All the examples you will see, and all AR.js web apps in general, have to be run on a server. You can use local server or deploy the static web app on the web.
So don’t forget to always run your examples on secure connections servers or localhost. Github Pages is a great way to have free and live websites under https.