Questions tagged [webxr]

This specification describes support for accessing virtual reality (VR) and augmented reality (AR) devices, including sensors and head-mounted displays, on the Web.

Hardware that enables Virtual Reality (VR) and Augmented Reality (AR) applications requires high-precision, low-latency interfaces to deliver an acceptable experience. Other interfaces, such as the RelativeOrientationSensor and AbsoluteOrientationSensor, can be repurposed to surface input from these devices to polyfill the WebXR Device API. The WebXR Device API provides purpose-built interfaces to VR/AR hardware to allow developers to build compelling, comfortable immersive experiences.

Documentation:

149 questions
7
votes
1 answer

WebXR controllers for button pressing in three.js

I would like to figure out how to map out the controls for my oculus quest and other devices, using three.js and webXR. The code works, and allows me to move the controller, maps a cylinder to each control, and allows me to use the trigger to…
Justin W King
  • 71
  • 1
  • 4
7
votes
4 answers

How can I get camera world direction with webxr?

I would like to use camera.getWorldDirection() and access to the head-mounted display directions. I was able to do this with the previous webVR API. When I use the new HelioWebXRPolyfill.js from THREE, I am not able to receive current positions.
Cagri
  • 657
  • 2
  • 8
  • 17
6
votes
2 answers

WebXR typescript support

I want to experiment with webxr and have setup a typescript project. According to WebXR I should do the following: const supported = await navigator.xr.isSessionSupported('immersive-vr'); With my typescript setup navigator.xr is displayed as…
greedsin
  • 1,252
  • 1
  • 24
  • 49
4
votes
1 answer

Listen for Oculus controller events in any website

Is it possible for a webpage to listen for button presses of a Oculus controller simply using some generic javascript code like document.addEventListener? In VR browsers by default the primary thumbstick scrolls the page up and down. The idea is to…
Gabe
  • 5,997
  • 5
  • 46
  • 92
4
votes
0 answers

How do I implement this very common AR scenario in react-three/xr

I'm trying to implement an iconic AR user scenario using react-three/xr. A typical scenario is: the user clicks a button to enter AR mode. the 3D model is automatically placed on a plane in front of the AR device, usually a floor but sometimes a…
Bill O
  • 315
  • 4
  • 13
4
votes
0 answers

How do I get multiple .gltf models to work in three.js webxr_ar_hittest example?

I'm using this example https://threejs.org/examples/?q=webxr#webxr_ar_hittest from three.js and the example works very well but when I change the cylinder to a model it just lets me put one model instead of letting me put several models in the place…
3
votes
0 answers

I keep seeing, "Failed to execute 'requestSession' on 'XRSystem': There is already an active, immersive XRSession" , when I try to use WebXR in React

Has anyone successfully been able to use WebXR in React? I'm trying to convert the code in the following tutorial from vanilla.js to react.js : https://www.devbridge.com/articles/ar-app-development-tutorial/ But I keep seeing an error…
Nandita
  • 47
  • 4
3
votes
1 answer

threejs - raycasting in AR with controller after repositioning

I'm rather new to threejs, so what I'm doing might not be the most efficient way. I have an object in AR on a mobile device and I want to know if I intersect with it when touching on the screen. I use the following code to generate the raycast, and…
Armalyte
  • 33
  • 3
3
votes
1 answer

What is the status of WebXR in Electron?

There have been posts in various places over the last few years about WebVR in Electron, and the answer has always been (very reasonably) that it is not a core part of Chromium and so not supported in Electron. However, WebXR is now a core part of…
Stephen Todd
  • 365
  • 3
  • 12
3
votes
0 answers

How to fix the Threejs webxr examples for wide FOV displays?

Threejs has some webxr examples but they all seem to assume the user will be using a small FOV headset and use parallel projections. When you view them on a wide FOV headset with canted displays (like a Pimax) the 3D objects for the left/right eye…
cecil
  • 317
  • 2
  • 8
3
votes
0 answers

A-frame / other js lib, changing VR eye angles or eye camera position

In VR mode of A-frame library, is it possible to change view angles for the eyes? I mean, set both eyes not to look at the same point but look at different items. I am aware of the fact that it may create a discomfort for the user. Changing camera…
Tukkan
  • 1,574
  • 2
  • 18
  • 33
3
votes
0 answers

How to overlay HTML text/buttons on webXR camera view?

I'm trying to create my webXR app based on this example: https://threejs.org/examples/#webxr_ar_cones I wonder how I can overlay the HTML buttons/texts on top of the AR camera view. I tried to place a button but it disappears as soon as I press the…
Zack Lee
  • 2,784
  • 6
  • 35
  • 77
3
votes
0 answers

What is the correct way to render webXR AR scenes using THREE.js?

I'm pretty new with THREE.js and webXR. The current spec is very confusing to me. the webXR API examples don't show any way to use the THREE.js renderer, and the examples from Three seem to be in a "in between" stage of using webVR vs using…
NotBramKorsten
  • 304
  • 1
  • 13
2
votes
1 answer

Can't move camera in A-Frame with Oculus Quest 2

Is it possible to move camera in A-Frame projects with Oculus touch controllers? Can't find any working example.
2
votes
1 answer

Export Babylon.js as a native Oculus application

I'm implemented a WebXR app using Babylon.js. To run it on my Oculus Quest 2, I'm using the Oculus browser. Can I save it as a native Oculus application?
Noam Peled
  • 4,484
  • 5
  • 43
  • 48
1
2 3
9 10