Skip to content
Josh Stovall edited this page Dec 10, 2020 · 5 revisions

XR.js 🥽 GitHub Wiki

XR.js seeks to make VR/AR web development easy.

It wraps Three.js, WebXR Device API, Gamepad API, Physijs, TweenJS and Socket.IO into one framework.

The goal is to create a single framework to keep things simple for developers.

Table of Contents

Introduction

General

Objects

User Interface

Media

Input

Getting Started

To get things set up, first create a Reality().

// create a reality
var myReality = new XR.Reality();

Lets add a few objects to our reality.

// add objects
var floor = new XR.Floor();
var box   = new XR.Box();

To interact with the user, add a User().

var user = new XR.User();

Now we can give them controllers, hands, or move them around the reality.

We can add controllers with Gamepad() or hands with Hands().

// setup controllers
var controller = new XR.Gamepad();

// setup hands
var hand = new XR.Hands();
Clone this wiki locally