AR-js-org /AR.js
Image tracking, Location Based AR, Marker tracking. All on the Web.
★ 5,997⑂ 1,000👁 147⑃ 149● 423▤ 9
-1
日增长
5,997
stars
1,000
forks
147
watchers
149
prs
423
issues
9
releases
README
AR.js - Augmented Reality on the Web


You can now own the first commit of AR.js! 👉OpenSea
AR.js is a lightweight library for Augmented Reality on the Web, coming with features like Image Tracking, Location-based AR and Marker tracking.
30/12/21 Update: There is now also a brand new OSS Web AR JS library around, called MindAR.
If you need a great Image tracking feature (also multiple image tracking) and Face tracking, go check it out!
As for now, AR.js is still the only library providing Marker based and Location based AR features.
This project has been created by @jeromeetienne, previously managed by Nicolò Carpignoli and it is now maintained by the AR.js org.
🚀For frequent updates on AR.js you can follow @the official 𝕏(Twitter) account and Watch this repo!
Logo is courtesy of Simon Poulter .
------
⚡️AR.js has now an official Documentation!⚡️
Check it out: AR.js Official Documentation.
If you want to give a first look at AR.js potential, you can continue with this Readme.
-----
⚡️ AR.js is coming in different builds. They are both maintained. They are exclusive.
Please import the one you need for your project, not both:
- AR.js with Image Tracking + Location Based AR (AFRAME):
- https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar-nft.js
- AR.js with Marker Tracking + Location Based AR (AFRAME):
- https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js
- AR.js with Image Tracking + Marker Tracking (Threejs):
- https://raw.githack.com/AR-js-org/AR.js/master/three.js/build/ar-threex.js
if you need the ARjs namespace import ar.js:
- https://raw.githack.com/AR-js-org/AR.js/master/three.js/build/ar.js
- AR.js with Location Based AR (Threejs):
- https://raw.githack.com/AR-js-org/AR.js/master/three.js/build/ar-threex-location-only.js
You can also import a specific version replacing master keyword with version tag:
html
Get started
🖼 Image Tracking
Please follow these simple steps:
- Create a new project with the code below (or open this live example and go directly to the last step)
- Run it on a server
- Open the website on your phone
- Scan this picture to see content through the camera.
html
.arjs-loader {
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.8);
z-index: 9999;
display: flex;
justify-content: center;
align-items: center;
}
.arjs-loader div {
text-align: center;
font-size: 1.25em;
color: white;
}
Loading, please wait...
🌍Location Based Example
Please follow these simple steps:
- Create a new project with the following snippet, and change add-your-latitude and add-your-longitude with your latitude and longitude, without the <.
- Run it on aTop issues
#498[bug report] Stretched camera feed50 comments · 2023-01-08#278Content 'sticking to' camera on certain devices39 comments · 2021-05-22#46NFT on iPad not working35 comments · 2020-03-10#121Webcam Error NotReadable Samsung Galaxy S10 S20 29 comments · 2020-06-06#192NFT Image Tracking size and position problem28 comments · 2020-11-05#40Raycaster is off center or scaled based on window size27 comments · 2020-03-05#466DeviceOrientationControls iOS initial heading/alpha correction26 comments · 2022-10-18#196NFT fset & iset files not loading consistently, stuck at "Loading, please wait..." screen25 comments · 2020-11-14
Discussions
#677Barcode marker value1 comments · 2025-09-09#674Video record0 comments · 2025-07-02#678Help needed. Example to loop over models1 comments · 2025-06-28#618Do not connect AR.js2 comments · 2024-11-26#613New project for location-based AR within AR.js org1 comments · 2024-10-03#601AR.JS location based project mixed with AFRAME Hit Test0 comments · 2024-04-19#597Location-base and Image Tracking Dependency conflict0 comments · 2024-03-04#596position and size Settings of a-entity in a-nft0 comments · 2024-03-04
Latest release
3.4.8 3.4.8 2026-03-16What's Changed Make Three.js location-based examples available on iPhone by @ma2yama in https://github.com/AR-js-org/AR.js/pull/659 Support for navigator in Safari on iPad with iOS 13 or later by @ma2yama in https://github.com/AR-js-org/AR.js/pull/660 Fix Prettier configuration file name by @ma2yama in https://github.com/AR-js-org/AR.js/pull/662 Enable altitude by @ma2yama in https://github.com/AR-js-org/AR.js/pull/671 Upgrade dependencies and implement simple-git-hooks for linting by @kalwalt in https://github.com/AR-js-org/AR.js/pull/682 Full Changelog: https://github.com/AR-j