- Home
- Platforms
- Services
- Our Story
- Join Us
- Solutions
- About
- Resources
- Connect Now
Get more updates and further details about your project right in your mailbox.
The best time to establish protocols with your clients is when you onboard them.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Augmented reality (AR) embeds the real world with computer-generated digital information like visuals and sounds. AR uses computer hardware and software, such as apps, consoles, screens, or projections, to combine digital information with the real-world environment.
AR is a growing trend among companies developing metaverse solutions, particularly in mobile computing and business applications.
Augmented Reality (AR) offers great experiences that bring the virtual and physical world together. Initially though AR development was limited to native mobile apps, with the advent of AR.js, we can now create AR experiences directly in the browser within minutes. In this article, we’ll see about AR.js, a simple library for augmented reality on the web, and let’s also walk through a basic example to get you started!
AR.js is an open-source library that allows developers to create AR applications that run efficiently in web browsers. AR.js is built on top of three.js. One of the key advantages of AR.js is its performance, which is capable of running AR experiences at 60 frames per second on smartphones. It supports marker-based AR, location-based AR, and even markerless AR. In this article we will learn to work with marker-based AR.
AR.js features the following types of Augmented Reality, on the Web:
The below script helps you check for the WebRTC and WebGl support of your browser.
In this article we use AR.js with A-Frame, a web framework for building virtual reality (VR) experiences. It provides an easy-to-use declarative HTML API to create 3D and VR scenes. Here we use A-frame to build a 3D model AR.
Let’s get into the example, all you need is a bit of HTML knowledge, a web browser and a text editor (I have used VS code). The below short script gives you the basic AR webpage.
In the above,
<script src=”https://aframe.io/releases/1.2.0/aframe.min.js"></script>
includes the A-Frame library.
<script src=”https://cdn.rawgit.com/jeromeetienne/AR.js/master/aframe/build/aframe-ar.js"></script>
includes the AR.js library for A-Frame.
<a-scene embedded arjs>:
<a-marker preset=”hiro”>:
<a-box position=”0 0.5 0" material=”color: red;”></a-box>:
<a-entity camera></a-entity>:
AR web with default Hiro marker
We can also use custom markers. For creating custom markers upload your desired image in the website, https://jeromeetienne.github.io/AR.js/three.js/examples/marker-training/examples/generator.html and download your marker in .patt format.
Now just replace <a-marker preset=”hiro”> in the above example to <a-marker type=”pattern” url=”your-pattern.patt”>
AR web with custom AR marker
Let us now try adding a gif instead of the 3D box object. All we need is to download the gif we wanted and Replace <a-box> with <a-plane>:
In the a-plane material specify the path of your gif like given below:
<a-plane position=”0 0.5 0" width=”1" height=”1" rotation=”-90 0 0" material=”src: url(your-gif.gif);”></a-plane>
AR web with custom AR marker and gif: