Most JavaScript libraries support marker-based AR, where users scan a physical marker with their device’s camera to trigger an AR experience.
Some libraries support markerless AR, which uses object recognition to trigger AR experiences without requiring a physical marker. Here are the top JavaScript Augmented Reality libraries used to create web AR experiences. AR libraries support the display of 3D models in AR, which will allow developers to create immersive experiences which blend digital content with the real world. It supports the display of image and video overlays in AR which can be used for displaying information or creating interactive experiences.
It uses advanced tracking algorithms for tracking the orientation and position of the device in real-time, which will allow the AR content to be accurately placed and aligned with the real world. These libraries are optimized for best performance with the help of techniques like feature and image recognition for reducing the amount of processing required for tracking the device’s orientation and position.
Here is the list of top 19 JavaScript Augmented Reality libraries that are handpicked to help developers:
three.js
- Is a JavaScript library that makes creating and displaying 3D graphics in a web browser easier.
- Is one of the most popular 3D graphics libraries for the web and is widely used by web designers and developers for creating immersive and interactive experiences.
- Uses WebGL, a web standard to render 3D graphics, for creating high-performance graphics which can be displayed in a web browser.
AR.js
- Is a JavaScript library to create AR experiences on the web which uses computer vision to enable marker-based AR experiences without additional plugins or software.
- Is a lightweight library for Augmented Reality on the web with features like Location-based AR, Marker Tracking, and Image Tracking.
- Supports marker-based AR that will allow users to scan physical markers with their device’s camera to trigger AR experiences.
AR.jsby AR-js-org
Image tracking, Location Based AR, Marker tracking. All on the Web.
AR.jsby AR-js-org
JavaScript 4613 Version:3.4.5 License: Permissive (MIT)
three.ar.js
- Is a JavaScript library that extends Three.js and AR.js to provide a framework for creating AR experiences in a web browser.
- Is designed to simplify the process of creating an AR experience by offering utilities and tools which integrate seamlessly with AR.js and Three.js.
- Is optimized for use on mobile devices and supports both Android and iOS.
three.ar.jsby google-ar
A helper three.js library for building AR web experiences that run in WebARonARKit and WebARonARCore
three.ar.jsby google-ar
JavaScript 2832 Version:Current License: Permissive (Apache-2.0)
webxr
- The WebXR device API to access VR and AR devices, like head-mounted displays and sensors on the Web.
- Is designed for creating immersive augmented reality and virtual experiences in web browsers.
- Is designed to be easy to set up and use with a simple API, allowing developers to get started quickly.
webxrby immersive-web
Repository for the WebXR Device API Specification.
webxrby immersive-web
JavaScript 2454 Version:CRS-20220331 License: Others (Non-SPDX)
jeelizFaceFilter
- Is lightweight and does not include a 3D engine or third-party library.
- Is a JavaScript library that detects and tracks the face in real time from the camera video feed captured with WebRTC.
- Offers various demonstrations using the main WebGL 3D engines, which can overlay 3D content for AR applications.
jeelizFaceFilterby jeeliz
Javascript/WebGL lightweight face tracking library designed for augmented reality webcam filters. Features : multiple faces detection, rotation, mouth opening. Various integration examples are provided (Three.js, Babylon.js, FaceSwap, Canvas2D, CSS3D...).
jeelizFaceFilterby jeeliz
JavaScript 2410 Version:3.0 License: Permissive (Apache-2.0)
viro
- Is a platform for developers to build Augmented and Virtual Reality experiences rapidly.
- Is a cross-platform AR/VR development platform that allows developers to create immersive experiences for web, virtual reality, and mobile device headsets.
- Provides a suite of features and tools for making creating high-quality AR and VR experiences easier.
exokit
- Is an open source JavaScript engine to create and run immersive experiences in virtual reality headsets, web browsers, and other platforms.
- Offers various features and tools, allowing developers to create and deploy immersive experiences and applications.
- Supports virtual experiences by allowing developers to create immersive experiences which can run on virtual reality headsets.
js-aruco
- Is a JavaScript library for marker-based augmented reality.
- Is an implementation of the ARToolKit library, allowing developers to create marker-based AR experiences in web browsers.
- Includes algorithms for detecting markers in real-time video streams, allowing developers to create experiences that respond to the physical world.
js-arucoby jcmellado
JavaScript library for Augmented Reality applications
js-arucoby jcmellado
JavaScript 549 Version:Current License: Others (Non-SPDX)
React-Web-AR
- Is based on the WebXR API and Three.js library, making creating high-quality AR experiences in the browser easier.
- Includes various components and tools for creating animations, 3D models, and other assets, making it easier to create high-quality AR content.
- Supports image tracking, allowing developers to create experiences triggered by specific patterns or images.
React-Web-ARby nitin42
🕶️ Augmented Reality on web with React
React-Web-ARby nitin42
JavaScript 566 Version:Current License: No License
ar-facedoodle
- Is a JavaScript library that can enable developers to create AR experiences that track and draw on the user’s face in real-time.
- Is based on the WebRTC and TensorFlow.js libraries, making it possible to create a high-quality AR experience in web browsers without additional software or plugins.
- Is easy to set up and use with a simple API, allowing developers to get started quickly.
ar-facedoodleby cyrildiagne
Doodle AR masks right from the browser with tensorflow.js
ar-facedoodleby cyrildiagne
JavaScript 492 Version:Current License: Permissive (MIT)
jeelizAR
- Is a JavaScript Object Detection lightweight library for AR that uses convolutional neural networks running on the GPU with WebGL.
- Is designed to work on various platforms, like mobile devices and desktops, and is compatible with various browsers.
- Includes algorithms to detect markers in real-time video streams, allowing developers to create experiences that respond to the physical world.
jeelizARby jeeliz
JavaScript object detection lightweight library for augmented reality (WebXR demos included). It uses convolutional neural networks running on the GPU with WebGL.
jeelizARby jeeliz
JavaScript 315 Version:Current License: Permissive (Apache-2.0)
threex.webar
- Is a threex extension for three.js, which offers an easy-to-use extension for experimenting with augmented reality and three.js.
- Is built on top of the Three.js library, making it possible to create high-quality AR experiences with 3D graphics and animation.
- Has an active community of contributors and developers, making it easy to get support and help when required.
threex.webarby jeromeetienne
three.js extensions for Augmented Reality
threex.webarby jeromeetienne
JavaScript 308 Version:Current License: No License
WebXR-emulator-extension
- Is a browser extension that helps your WebXR content creation and enables you to run WebXR applications on your browser without any XR devices.
- Includes multiple XR devices emulation, graphical device emulator control with Three.js, and cross browsers support with WebExtensions API.
- Allows developers to customize the environment they are testing their WebEX projects in, like adjusting the room lighting, scale, and other parameters.
WebXR-emulator-extensionby MozillaReality
WebXR emulator extension
WebXR-emulator-extensionby MozillaReality
JavaScript 368 Version:v0.3.0 License: Weak Copyleft (MPL-2.0)
webxr-polyfill
- Is a JavaScript implementation of the WebXR Device API and the WebXR Gamepad Module.
- Allows developers to write against the latest specifications, offering support if run on browsers that implement the WebVR 1.1 spec or on mobile devices.
- Offers a fallback mechanism for legacy browsers and provides additional functionality unavailable in native WebXR API.
webxr-polyfillby immersive-web
Use the WebXR Device API today, providing fallbacks to native WebVR 1.1 and Cardboard
webxr-polyfillby immersive-web
JavaScript 335 Version:v1.0.0 License: Permissive (Apache-2.0)
3dio-js
- Is a JavaScript library that enables developers to create interactive 3D audio experiences in web browsers.
- Is built on top of the Web Audio API and Three.js, making it easy to create high-quality audio experiences with 3D spatialization.
- Various customization options allow developers to adjust the audio spatialization, sound effects, and other parameters to suit their requirements.
3dio-jsby archilogic-com
JavaScript toolkit for interior apps
3dio-jsby archilogic-com
JavaScript 255 Version:Current License: Permissive (MIT)
wasm-sudoku-solver
- Is a JavaScript library that uses WebAssembly to offer an efficient Sudoku-solving algorithm in web browsers.
- Is designed for solving sudoku puzzles quickly and accurately, making it a valuable tool for developers creating Sudoku puzzle applications or games.
- Various customization options allow developers to adjust the solving algorithm and other parameters to suit their requirements.
wasm-sudoku-solverby ColinEberhardt
a WebAssembly-powered AR sudoku solver
wasm-sudoku-solverby ColinEberhardt
JavaScript 251 Version:Current License: No License
webxr-polyfill
- Is a JavaScript library that offers support for the WebXR API on browsers that do not natively support it.
- Is designed to enable responsive and immersive AR and VR experiences on the web, like support for hand tracking, head-mounted displays, and other features.
- Includes optimizations for performance, including asynchronous loading of resources, reducing latency, and minimizing the impact on CPU and memory usage.
webxr-polyfillby mozilla
A polyfill and example code for building augmented reality (AR) and virtual reality (VR) applications using WebXR.
webxr-polyfillby mozilla
JavaScript 255 Version:Current License: Weak Copyleft (MPL-2.0)
aframe-ar
- Is a JavaScript library that offers an effortless way to create AR experiences on the web.
- Includes a range of customization options, allowing developers to adjust the appearance and behavior of their AR experiences
- Offers an accessible and user-friendly way for developers to create compelling AR experiences on the web.
aframe-arby chenzlabs
Basic A-Frame support for browser-based augmented reality (AR), supporting the new WebXR AR support in Chrome v81+ as well as WebXR Viewer.
aframe-arby chenzlabs
JavaScript 230 Version:v0.3.2 License: Weak Copyleft (MPL-2.0)
WebAR-Article
- Is a JavaScript library created by Google AR which offers a straightforward way to embed AR content into web pages.
- Includes various customization options, allowing developers to adjust the behavior and appearance of their AR experiences.
- Can be easily integrated with other JavaScript libraries, making it possible to create more complex AR experiences.
WebAR-Articleby google-ar
WebAR-Article is a responsive and information rich website that is progressively enhanced with Augmented Reality content exposed through experimental web technologies.
WebAR-Articleby google-ar
JavaScript 227 Version:Current License: Permissive (Apache-2.0)
FAQ
1. What advantages does the AR-Display AR library offer for making Augmented Reality?
Here are the advantages of using AR – Display AR library for developing AR experiences:
- Simplified Development: Developers can create AR experiences more easily without starting from scratch. It can significantly reduce development time and effort.
- Hardware Abstraction: It simplifies using various AR devices and sensors by removing complications. No matter what hardware they use, developers can always interact with it consistently.
- Optimized Performance: Optimized Performance helps improve how AR experiences work. It makes rendering more efficient, handles camera inputs, and manages 3D objects.
- Feature Set: It often comes with various built-in features and tools. It can be marker detection, gesture recognition, 3D rendering capabilities, and object tracking.
- Scalability: It helps your AR experiences work well in different situations and places.
- Rapid Prototyping: It helps with quick prototyping and testing of AR concepts. It is essential for iterating on ideas and refining the user experience.
2. How can webcam filters be used to build JavaScript Augmented Reality experiences?
Creating JavaScript-based Augmented Reality experiences using webcam filters involves using computer vision methods. It processes the live video feed from a user’s webcam and overlays virtual elements. We can achieve it by combining JavaScript, HTML, and CSS.
Here is a basic outline of how you can build such experiences:
- Access Webcam Feed: You can use the ‘getUserMedia’ API to access the user’s webcam feed in the browser. It allows you to request permission to access the webcam and receive a live video stream.
- Canvas Rendering: You can make a canvas on your webpage to show the webcam and AR elements. You can use JavaScript to capture frames from the webcam and render them onto the canvas.
- Computer Vision Libraries: It can help track objects, detect features, and process images. It assists in finding markers, applying filters to video frames, and tracking movements.
- Marker Detection: The camera can display virtual markers by recognizing patterns or images.
- Applying Filters: You can improve videos by adding CSS and HTML filters and effects. You can use this for image overlays, animations, and color adjustments.
- Interaction and Animation: JavaScript can make interactive elements respond to user actions. It can also respond to movements detected by the webcam. Implement animations and transformations based on user interactions.
- Testing and Debugging: To ensure your AR experience works on all devices, test and debug it. Debug any issues related to webcam access, rendering, or the application of filters.
- Deployment: To share your AR experience online, deploy it on a web server or hosting platform.
3. Can you create immersive and interactive experiences using a JavaScript AR library?
Creating immersive and interactive AR experiences using a JavaScript AR library. The difficulty of the task depends on the library you select. It can be easy or hard. Here is a breakdown of the factors to consider:
Advantages:
- Familiar technology
- Web-based
- Quick Prototyping
- Community Support
- Web Standards
Disadvantages:
- Complexity
- Performance
- Learning Curve
- Compatibility
- Hardware Limitations
- Advanced Interactions
4. What AR experiences can you have with a JavaScript AR library?
JavaScript AR libraries can make interactive and engaging experiences using marker-based AR. The camera finds special markers, like pictures or patterns, to trigger these experiences. Here are many types of marker-based AR experiences:
- Image Overlay
- 3D Model Augmentation
- Informational Displays
- Virtual Try-on
- Interactive Games
- Educational Tools
- Navigation and Wayfinding
- Art and Creativity
- Social Sharing
- Animation Stories
- Training and Simulations
- AR Marketing Campaigns
5. Are there any limitations with JavaScript augmented reality library?
Yes, JavaScript AR libraries come with limitations. The limitations can affect the complexity of experiences you can create. They can also impact how well your applications work and how users experience them. Here are some common limitations associated with JavaScript AR libraries:
- Performance
- Device Compatibility
- Tracking Accuracy
- Limited Features
- Latency
- Battery Drain
- Network Dependency
- Marker Design Constraints
- Web Browser Limitations
- Learning Curve
- Limited Offline Functionality
- Privacy Concerns
- Lack of Native Integration
6. Which libraries are popular for tracking AR types like markers, locations, and images?
Here are some popular libraries for various types of AR experiences:
- Marker-based AR
- AR.js
- Vuforia
- Wikitude
- Location-based AR
- GeoAR
- Google ARCore and Apple ARKit
- Image Recognition-Based AR
- EasyAR
- Vuforia
- Wikitude
7. How can an existing JavaScipt AR library be integrated into a project or website?
Follow these steps to add a JavaScript AR library to your project or website. Here is how you can integrate:
- Choose the library
- Include the library files
- Set Up HTML structure
- Access Camera Feed
- Initialize the Library
- Configure and Customize
- Implement AR interactions
- Style and UI
- Testing and Debugging
- Deployment
- Ongoing Maintenance
8. Can developers find tutorials or guides for creating augmented reality with these libraries?
You can use JavaScript AR libraries to create AR experiences. Find online tutorials and guides. Here are some places to find tutorials and guides:
- Official documentation
- YouTube
- Online Learning Platforms
- Blogs and Websites
- Forums and Communities
- GitHub Repositories
- AR library Websites
- Social Media
- Webinars and Conferences
- Community Workshops