webxr | Repository for the WebXR Device API Specification | Augmented Reality library
kandi X-RAY | webxr Summary
kandi X-RAY | webxr Summary
The WebXR device API is for accessing virtual reality (VR) and augmented reality (AR) devices, including sensors and head-mounted displays on the Web. The WebXR Device API Specification is the repository of the Immersive Web Working Group.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Write output to the temporary directory .
- Check error and process errors
webxr Key Features
webxr Examples and Code Snippets
Community Discussions
Trending Discussions on webxr
QUESTION
Google's provides all the key features I need without having write a custom solution via something like react-three-fiber
or directly in three.js.
I am struggling with how to properly integrate it into a Reagent (and React for that matter) structure.
In order to make it easy to use with vanilla JS, is built as a web component and is largely controlled via the attributes on its html element. Normally that wouldn't be much of a problem, but with the overhead of 3D and loading large models re-rendering this is expensive and in many cases functionality-breaking.
I've tried to naively use it inside a component and trying to eliminate the possibility of re-rendering. Using a ref to mutate it directly.
I have also tried setting it up as a manually created html element from the Reagent/React controlled application and reference it in various events via its dom element.
Both of these options introduced a lot of hacks and were not ideal in a single page application.
I am wondering if anyone has any tips on how to best wrap this in a React/Reagent shell, while still having access to the core element to use their underlying JS api.
Answers don't have to be in ClojureScript.
Here is the example of its usage from their page:
...ANSWER
Answered 2022-Mar-17 at 14:59- Include it in your index.html as a
module
type script.
QUESTION
thanks kindly for your time and attention. I recognise this is a long shot but I'm hoping someone might be generous enough to relay some advice or guidance. I am in the beginning phases of researching how I might build an app for a mobile device, using javascript and related tools, libraries and packages. The concept for the app is that it will access the device camera, recognise faces, and overlay animated AR assets onto the device display. However, I want users to couple their phone with a wearable headset, and use the app through a split screen VR style display. I assume I'll need some sort of VR wrapper for the core AR application. At the moment, I am focussed primarily on the graphical display and UI aspects, so that I can build a proof-of-concept to test whether the idea is even viable. I recognise I may be misguided to attempt this in javascript rather than native mobile languages - if this is the case, I would welcome any opinions on the matter. I'm asking about javascript because that's what I know, basically.
Thus far, I've been reading about various libraries such as WebXR, Three.js and others. I assume I'll need to use React Native, though it's not easy to get a clear sense of whether I should even be trying to achieve what I want using javascript. I have no code to show as yet.
Additionally, I recognise there are similar questions already posted to the forum - for example, this one: VR+AR on mobile phone. I haven't found any recent threads that address this specific set of requirements so I do apologise if I've missed something. If there is info on the forum, grateful if someone could point me to the relevant thread. At the very least, thanks for reading. Cheers, all.
...ANSWER
Answered 2022-Mar-11 at 00:28I found Snap's Lens Studio extremely intuitive and powerful. It provides templates for feature recognition, tracking, and physics. It also provides advanced controls for custom creative. I would also expect it to receive future feature development support. It can be monetized.
...or do you want to expose yourself to more computer vision terminology and patterns? Try searching CodePen or CodeSandbox for features such as: MediaPipe, OpenCV, face detection webcam. But the overhead of a VR/AR app is probably best described in an O'Reilly book or John Carmack keynote speech. Topics like pupil distance, foot tracking, and predictive tracking.
QUESTION
I'm trying to share anchors from WebXR over the network with other clients. However, they only have one property, anchorSpace, which itself doesn't have any properties:
...ANSWER
Answered 2022-Mar-10 at 10:32Anchors are currently explicitly not-persistent or sharable. - @AdaRoseCannon (Feb 9, 2022) in https://github.com/immersive-web/anchors/issues/71#issuecomment-1033705978
QUESTION
I've created a proof-of-concept SPA (source code / demo) which loads stereoscopic images from a web server and renders them in stereoscopic 3D using the aframe-stereo-component for A-frame.
Testing this on a Quest 2 in the Oculus Browser and Firefox Reality, this works fine: each image appears in 3D when viewed in immersive VR mode via WebXR.
However, after scrolling through a number of images (usually 8 to 12), the slideshow stops working. In Firefox Reality, this manifests by the app just freezing and becoming unresponsive.
In Oculus Browser, the image description is displayed but the image area remains black. Connecting the Quest 2 to a PC with adb and inspecting the page using Chrome DevTools, I can see the following output when this occurs:
...ANSWER
Answered 2021-Oct-04 at 09:18The asset management system (a-assets
) is intended to help with preloading assets, not throwing them in and out at runtime.
Removing the element from the assets won't dispose the texture (which is cached within the material system).
You can access and clear the cache, but I'd try managing the images 'manually',
loading the image via
new THREE.Texture(src)
like the material system doesapply the material with
QUESTION
I'm trying to use WebXR using Three.js in React but I keep seeing this error:
'XRWebGLLayer' is not defined no-undef
for baseLayer: new XRWebGLLayer(session, gl)
I tried this same code in vanilla.js and had no errors at all but when I try it with react.js it doesn't compile.
The tutorials I'm referring to are: https://developers.google.com/ar/develop/webxr/hello-webxr and https://www.devbridge.com/articles/ar-app-development-tutorial/
I'm using version 0.133 of three.js and I imported it into my react app using:
import * as THREE from 'three';
I'm relatively new to react and three.js. Can anyone please help point me in the right direction? I'd really appreciate it!!
...ANSWER
Answered 2021-Oct-11 at 06:42XRWebGLLayer
is available in the window
object.
Also refer:
https://stackoverflow.com/a/62264777/4290781
QUESTION
UPDATE IN ANSWER BELOW
Is anyone else experiencing the newest couple versions of chrome causing issues with legacy Java applications? Just yesterday I needed to get the company's policy manager to allow downloading files from an internal unsecured server by adding our URLs to a whitelist - you can see the details of the process on the chromium blog here. That issue was present in v90 as well.
What I'm currently experiencing due to the v91 update is as follows: My boss was trying to use a page in one of our Java 6 legacy applications and he noticed that the page wouldn't return the data in any format - we checked and he was already v91. I was on v90 and the page worked fine. After updating Chrome to v91, I'm getting the same broken page as my boss.
I was thinking it might be something related to the CSS but I don't have time to poke at it and redeploy the legacy app every time to test the changes. Though, I have taken a peek at this chromium blog post for version 91. Though I don't see much relating to what may have caused the removal of all non-label fields and the formatting of the label fields are all wonky and out of place.
I'm going to look into investigating the struts tile that holds the code JSP code; if I find something I'll post it here for reference.
The first image below is what one row should look like with the header above it. As you see in the second picture, all there is the header with improper formatting and the grid is gone.
...ANSWER
Answered 2021-Jun-10 at 21:45I have determined the problem to be the
tag. In the newest version (v91) of Chrome, the table rendering engine has been rewritten. the notes are here and if you want the in-depth documentation, is the link to the Google Doc that the developers wrote. Basically, the old way of rendering tables has become obsolete and the Workaround: Disable the chrome flag named Enable TableNG
and restart your browser.
Addition: I found chromestatus, a website that shows new features being added, deprecations, etc.
tag is now defunct.QUESTION
How would one go about mirroring or cloning the WebXR 'immersive-xr'
view from a HMD like the VIVE or Oculus in the browser using the same WebGL canvas
?
There is much discussion about copying the pixels to a texture2D, then applying that as a render texture, or completely re-drawing the entire scene with an adjusted viewTransform
. These work well if you are rendering a different view, such as a remote camera or 3rd person spectator view, however both are a waste of resources if one only wants to mirror the current HMD view on the desktop.
Self answered below as there was no solid answer when I ran into this and I'd like to save future devs the time. (Especially if they're not all to savvy with WebGl2
and WebXR
)
Note, that I'm not using any existing frameworks for this project for 'reasons'. It shouldn't change much if you are, you'd just need to perform the steps at the appropriate place in your library's render pipeline.
...ANSWER
Answered 2021-May-11 at 12:46The answer is delightfully simple as it turns out, and barely hits my fps.
- Attach the canvas to the DOM and set it to your desired size. (Mine was fluid, so had a CSS width of 100% of it's parent container with a height of auto)
- When you initialize your glContext, be sure to specify that antialiasing is false. This is important if your spectator and HMD views are to be different resolutions.
{xrCompatible: true, webgl2: true, antialias: false}
- create a frameBuffer that will be used to store your rendered HMD view.
spectateBuffer
- Draw your
immersive-xr
layer as usual in yourxrSession.requestAnimationFrame(OnXRFrame);
callback - Just prior to exiting your
OnXRFrame
method, implement a call to draw the spectator view. I personally used a boolshowCanvas
to allow me to toggle the spectator mirror on and off as desired:
QUESTION
I am trying to use Google's model viewer to load 3D models. It has a button. But I want that button to be visible after the model is completely loaded. So, I used to use this Vanilla JavaScript code
...ANSWER
Answered 2021-Apr-15 at 22:57You need to control element within a React wrapper. See react-model-viewer, this is is their wrapper
QUESTION
I have been using a-frame since 2018 to show my scenographies to the directors I work for. I used the colladas files for my objects and everything was working great and my textures were as I wanted. But since the webxr (aframe-v1.1.0.min) appeared it is no longer possible to use collada I have tried the Gltf files but it is too heavy and not satisfactory. So I wanted to know how to put collada back into the a-frame scipts. I tried: "collada-model-legacy.js" with "ColladaLoader.js" in another folder but it doesn't work. Do you have a solution? Thank you
...ANSWER
Answered 2021-Feb-17 at 22:51You can use any of the loaders from the three.js repository - also the ColladaLoader.
You could create a wrapper component, which will use threejs loader and add the model to the scene:
QUESTION
I'm implementing a feature to get coordinate of an a-sky
while moving the VR controller.
ANSWER
Answered 2021-Feb-15 at 02:53It turns out that raycaster-intersected-cleared
event from parent element is fired but it does not mean that it is not intersected anymore. To confirm if it has been still intersected I have to check if getIntersection
result is NULL.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install webxr
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page