All Collections
CodeHS Guides
Technical Guides
Viewing Immersive Experiences with a VR Headset
Viewing Immersive Experiences with a VR Headset

Learn how to view your A-Frame projects as immersive 3D experiences when using a VR headset such as the Meta Quest

Gareth Gebhardt avatar
Written by Gareth Gebhardt
Updated over a week ago

Getting Started

Note: This guide was created using a Meta Quest 2. Other headsets should work as well, but some of the steps or menus may look a little different. For more information, check out A-Frame's official documentation.

Due to changes and updates made to the A-Frame framework, it may be necessary to change the version that's called in your code in order to have full compatibility with headsets such as the Meta Quest.

To do this, open up your A-Frame project in the Code Editor and locate the <script> tag linking to A-Frame; this should be between the <head> and </head> tags, typically on line 4. Notice the version number, which by default is set to 1.0.0:

Screenshot demonstrating the A-Frame source script in the code editor

To update the version of A-Frame being used, change just this part of the URL from 1.0.0 to 1.5.0, which is the most recent stable release:

Screenshot demonstrating the A-Frame source script in the code editor

Make sure to click Save!

Viewing in VR

Make sure your headset is powered on, updated to the latest software, and connected to the internet. Open up your device's App Library, and select Browser:

Screenshot showing where locate the browser in the Meta Quest 2

Log in to your CodeHS account or use a direct link to open up your A-Frame project in the Code Editor within your VR headset browser. Click the button in the top right corner to open up the page in a new tab:

Screenshot showing the VR button when viewing the project in a new tab in the Quest browswer

In the resulting new tab, click the VR button in the bottom right corner:

Screenshot demonstrating where to click to open the page in VR

You may see a prompt at the bottom of the screen asking Allow [abc123.codehs.me] to open an immersive experience? Click Allow:

Screenshot showing how to allow the page to open as an immersive experience

After following these steps, you should now be able to view your project in a fully immersive, 3D experience. To exit, press and hold the menu button on your controller to bring the Browser window back up, and select Quit:

Screenshot demonstrating how to exit the immersive VR experience


Still have questions? Contact our team at hello@codehs.com to learn more!

Did this answer your question?