Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please type your username.

Please type your E-Mail.

Please choose an appropriate title for the post.

Please choose the appropriate section so your post can be easily searched.

Please choose suitable Keywords Ex: post, video.

Browse

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Navigation

  • Home
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Contact Us
Home/ Questions/Q 226

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Latest Questions

Author
  • 62k
Author
Asked: November 25, 20242024-11-25T09:01:07+00:00 2024-11-25T09:01:07+00:00

VR/MR/AR/XR in Javascript?

  • 62k

Starting with the basics

VR is Virtual Reality. Virtual Reality intends to bring it's users into a new reality to explore and experience things unavailable in the real world.

AR is Augmented Reality. AR uses a combination of sensors, cameras, and mapping software to brings virtual objects and images into the real world.

MR is Mixed Reality and aims to do a little of both of the above.

XR or Extended Reality is a sort of larger umbrella term used to describe tech that takes in human-to-PC interface and modifies it by either immersing you in a virtual world (VR), brings new things to or adds to your existing environment (AR) or does a combination of those things (MR).

The selling points of any good XR experience is how immersive it is to the user. Early on there were limitations in the hardware and users were only able to experience 3 Degrees of Freedom (3DoF) with devices like Google Cardboard or Oculus Go. That meant that while inside the experience the virtual world would rotate with the movement of your cameras, but if you were to physically walk forward or crouch up and down the world would move with you.

DoF

Over time a new system of inside out tracking allowed for 6 Degrees of Freedom (6DoF). Now, not only did the hardware track the rotation of your cameras, but also it's relative position in space and could translate that data into your XR experience.

Web-Based AR/VR

Getting started with AR/VR development can be tough, and there are a few arguments to be made for why starting out web-based may be the way to go.
1) Nobody has to download an app! Just click the link and your user is already on the way to using your AR/VR experience.
2) No fees to host your product on an app store! No waiting/review period to see if your app makes the cut!
3) Web Dev is cross-platform and can quickly get your product into more end users hands.
4) Web 2.0 effect. Apps are constantly building on and integrating each other. Developing open-source projects online allows for other users to potentially use your product in a more grand design.

Early web building

Historical Challenges to Web-Based AR/VR

Historically web applications live in a browser sandbox, and aren't given much access to the external hardware that would be needed to build out an AR/VR experience worth coming back to. More modern day devices make this less of problem then it used to be, but AR/VR require a lot of processing power. They can be very CPU/GPU intensive and that could lead to poor performance in a browser application. On top of those cons, building for the web means you're going to have less access to the mature building blocks that already exist and make building VR/AR applications easier. (Things like Vuforia, UNREAL engine, Unity, or ARKit)

Things are changing, though…
times changing

Options for building Web AR applications

Most simple AR applications use a Marker system to anchor your AR objects in space. These systems use a camera to locate a symbol nd generate content relative to that symbols location.

More modern Markerless AR content also exists. AR that through an understanding of the world around it can recognize and map out horizontal surfaces.
It uses SLAM (Simultaneous Localization and Mapping) tracking. Using ARkit and SLAM tracking we're able to make unique AR experiences such as “portals” that have been seen on popular apps such as Snapchat and Instagram.

Three.js is a JavaScript based 3D library that allows you to write JavaScript code to instantiate 3D graphics and objects.

aframe is an Entity Component System that can run on top of three.js

An Entity Component System is a “Data oriented architectural systems that lend themselves well to game development because instead of of object oriented objects that derive their identity from a class or subclass they inherit from, entities derive their identity by their association with named sets of data (i.e. components) and you can mutate or assign those components to other entities on the fly and those entities wills start to adopt behavior that comes from those data sets through the systems that process those components.” -Don Shin, CrossComm

Three.js has a free editor.
aframe has a visual inspector.
Below is an example of a primitive entity object.

<a-entity id="box1"         geometry="primitive: box"         material="color: #FF9999; shader: flat"         position="0 0.15 -5"         rotation="0 45 0"         ></a-entity> 
Enter fullscreen mode Exit fullscreen mode

These tools are not as well polished as unity, but gives hope for the future of web development as better ecosystems for building 3d environments through web based technologies continue to emerge.

AR.js is a JavaScript framework (abstraction of JSARToolKit5) for building AR applications.

AR.js has 3 key features out of the box –

  1. Image Tracking using Natural Feature Tracking (NFT)
  2. Location Based AR
  3. Simple Marker (patterns, QWR codes) tracking

You can use AR.js on top of aframe of just AR.js alone.

Below are some rendered objects using aframe

Example of rendered objects

beginnersvrwebdevxr
  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

Stats

  • Questions 4k
  • Answers 0
  • Best Answers 0
  • Users 1k
  • Popular
  • Answers
  • Author

    How to ensure that all the routes on my Symfony ...

    • 0 Answers
  • Author

    Insights into Forms in Flask

    • 0 Answers
  • Author

    Kick Start Your Next Project With Holo Theme

    • 0 Answers

Top Members

Samantha Carter

Samantha Carter

  • 0 Questions
  • 20 Points
Begginer
Ella Lewis

Ella Lewis

  • 0 Questions
  • 20 Points
Begginer
Isaac Anderson

Isaac Anderson

  • 0 Questions
  • 20 Points
Begginer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore, ask, and connect. Join our vibrant Q&A community today!

About Us

  • About Us
  • Contact Us
  • All Users

Legal Stuff

  • Terms of Use
  • Privacy Policy
  • Cookie Policy

Help

  • Knowledge Base
  • Support

Follow

© 2022 Querify Question. All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.