Questions tagged [webvr]

WebVR is an experimental JavaScript API that provides support for virtual reality devices, such as the HTC Vive, Oculus Rift or Google Cardboard, in a web browser.

Note: WebVR is deprecated and has been superseded by WebXR; see .


The burgeoning WebVR APIs provide sensor information from virtual reality devices (such as the Oculus Rift) which, in conjunction with WebGL, allows for the creation of VR web applications.

More information at:

596 questions
3
votes
2 answers

A-frame : how to change image using javascript

What JavaScript is needed to change the image? I can't work out how to target them:
InsXghT
  • 53
  • 2
  • 10
3
votes
2 answers

Adding new entities on the fly in AFrame

I'm trying to build an AFrame app where users can click on something and a new scene will show up. From there, the user can click on something else, etc. This scene's data is taken from an API, so it's tough to know all possible scenes the user can…
hyperdo
  • 417
  • 1
  • 6
  • 11
3
votes
2 answers

Detect a head/camera motion with aframe

I'm in search for a motion detection in with a-frame. What I want to achieve is a detection if someone is moving his head when being in VR-Mode. Is there any property for an entity I can check? Or does the camera component itself has any…
casarock
  • 202
  • 3
  • 8
3
votes
1 answer

I'm having trouble including AFRAME in the Asset Pipeline of my Rails application

I want to include AFRAME into my Rails application. So I downloaded the minified version of aframe and in my Asset Pipe I wrote \\= require aframe.min.js When I try to access my AFRAME object, I get an error that is linked to me missing the ThreeJS…
Jonathan Allen Grant
  • 3,408
  • 6
  • 30
  • 53
3
votes
1 answer

How to add tags dynamically in Aframe webvr

What i want to do is on Click of a image i want to dynamically add a image on the scene. The problem is that the tag gets added but i am not able to attach a src attribute to it. I get this warning core:schema:warn Unknown property src for…
3
votes
1 answer

a-frame vr how to drag and drop assets / elements insight a picture?

I am trying out a-frame and can't find anything about how to drag and drop elements and have been looking for it for hours! Is anyone familiar with a-frame? Thanks thats my code so far:
javascript2016
  • 973
  • 3
  • 17
  • 41
3
votes
1 answer

How to display a 3D object in A-Frame?

I've read the A-Frame documentation and copied the code directly from it, but I'm having trouble displaying a 3D object in .obj and .mtl formats. This is what I have:
Nathan Diesel
  • 91
  • 2
  • 4
3
votes
3 answers

Why is my video or videosphere not playing on mobile in A-Frame VR?

I have an A-Frame scene with a video or videosphere:
3
votes
2 answers

Is there any callback function in Aframe

When I create an element of a-animation,I want to know the exact time when the animation finished.I know the "dur" or "begin" can calculate the approximate time,but is there any callback function when I use the a-animation element!
shadow
  • 43
  • 7
2
votes
1 answer

How can i get a Third person perspective for a model using Aframe?

I want my A-frame camera to be behind the model and work as a TPP. I want a model to sync with the camera and rotate and move where ever the camera is moving but it should not move if the camera is pointing up and down it should not look like the…
Sumit Sharma
  • 1,192
  • 1
  • 4
  • 18
2
votes
1 answer

A-frame add enable/disable component on function

I have created a scene using A-frame (https://aframe.io) and I currently have some rain in my scene and a button. What I would like to do is when the button is clicked, a function occurs, I'm wondering how I can make this function remove the rain…
Aidan Young
  • 554
  • 4
  • 15
2
votes
0 answers

Networked A-frame object

I am creating a scene in A-frame (https://aframe.io) using the networked A-frame component (https://www.npmjs.com/package/networked-aframe) and I'm wondering how I can create a "networked object" where when two users are in one scene and one user…
Aidan Young
  • 554
  • 4
  • 15
2
votes
1 answer

A-frame show gltf model if variable has a certain value

I am wondering how it would be possible using JavaScript and HTMl (aframe.io) to only show a gltf model if a variable has a certain vaue. For example, if I have a variable called x and x = 5 than show the gltf but if x doesn't equal 5 than hide the…
2
votes
1 answer

Implementing Three.js SSAOPass in AFrame

I was able to successfully integrate Threejs Effect composer in aframe as a component by exporting everything as THREE.Effectcomposer, THREE.SSAOPass etc. and adding the effect inside a aframe component and i tweaked the AFrame renderer to update…
2
votes
1 answer

Spawn entities in camera view using A-Frame without nesting

How can I spawn an entity directly in camera view without nesting it as a child node? I'm trying to spawn cubes in front of the user in certain situations that stay in their absolute position even as the camera moves to specific VR devices such as…