Live data from Hacker News

WebXR

immersiveweb.dev

21–30 of 68 posts

Re: WebXR

#21
It’s a low-level API. You’d typically use it under something like Aframe or Three.JS.

Re: WebXR

#22
post #7

Won't be touching WebXR again until iOS implements it. There's an experimental feature flag to enable it, so hopefully this actually happens soon.

Why would you want this on a phone though? It's for VR headsets.

You want one API that will work on all devices. Take this demo:

https://aframe.io/examples/showcase/sky/

On a VR headset you can just crane your neck and look around. On a phone or tablet it will use the accelerometer and let you use the device as a window on the virtual reality. On desktop you can use the mouse to scroll around.

Re: WebXR

#24
post #13
post #11

Earlier quoted context omitted.

Not sure what you're asking, exactly? Unity (and I presume Unreal) can do the same procedural generation stuff today your can do in js. There's many libraries/tutorials etc

Basically i'd like to add, edit, store and load code during runtime.

Just a heads up, when folks say “complex 3d objects”, it’s usually assumed that they’re talking about things like GLTF files, which contain geometry, materials, lighting elements, animations, etc, and which Unity/Unreal can absolutely load/unload at runtime or even stream from a media server online (so they don’t have to be in the binary).

However, once you cross over into scripting code, you are in fact crossing a barrier, and it does become harder to hot-reload the way you can in a JS app. Like, the fact that Unity scripts are written in C# and have to be compiled and linked is a pretty huge impediment that you don’t face when loading almost any other kind of asset.

I’m right there with you: Hot-reloading and 3D is a thrilling combination, and tools like react-three-fiber are miles ahead of anything I’ve seen in Unity-land in terms of laying foundations for stuff like this. I’d recommend emphasizing “hot-reloading code” when drawing this distinction with Unity/Unreal folks to better get across the magnitude of what you’re looking for.

Re: WebXR

#25
post #7

Won't be touching WebXR again until iOS implements it. There's an experimental feature flag to enable it, so hopefully this actually happens soon.

https://twitter.com/AdaRoseCannon

https://twitter.com/fernandojsg

https://bugs.webkit.org/show_bug.cgi?id=208988

https://webkit.org/status/#specification-webxr Status = "In Development"

Re: WebXR

#26

You can experience this on iPhone by installing Mozilla's WebXR Viewer [ https://apps.apple.com/us/app/webxr-viewer/id1295998056 ], then opening the dinosaur demo [ https://www.xrdinosaurs.com/ ]

Important to mention. Team at Mozilla was affected by layoffs a couple of years back and the WebXR viewer is no longer maintained. Ships an old version of the WebXR API. Don’t recommend as dev target

Re: WebXR

#27
VR was really impressive a few years ago, it was running only on gaming computers with VR headsets. Now, with the quest 2 (far less powerfull than the gaming computers mentioned above) and web XR, it seems that developers are targeting mainly low end platforms, and so recent apps and games are rather less immersive than before mainly due to dated graphic quality, and lags when you play it on the quest (who has just a powerfull phone cpu/gpu, poor thing), or in a browser. I hope webgpu will changes that in the browser, and surely an other autonomous headset will arise with a cpu comparable to the apple M1/M2.

Re: WebXR

#28
post #24
post #13

Earlier quoted context omitted.

Basically i'd like to add, edit, store and load code during runtime.

Just a heads up, when folks say “complex 3d objects”, it’s usually assumed that they’re talking about things like GLTF files, which contain geometry, materials, lighting elements, animations, etc, and which Unity/Unreal can absolutely load/unload at runtime or even stream from a media server online (so they don’t have to be in the binary). However, once you cross over into scripting code, you are in fact crossing a b…

Thanks for both hints.

I recently had more contact with gaming engines than I originally wanted and there's always this kind of community-specific vocabulary whenever you cross borders. Oh no,like in real life.

Re: WebXR

#29
post #18
post #13

Earlier quoted context omitted.

Basically i'd like to add, edit, store and load code during runtime.

Oh, code? I assumed you meant geometry and/or materials. Yes, it's possible. I can think of several ways to approach it. Not quite as cleanly as with javaScript, mind.

Heh. What would be your favourite thoughts/combo here?

Sorry for not being clear on the code part. I assumed USD and the like would be the norm now. "Complex objects" is not really helpful in this context, though.

Re: WebXR

#30
post #10

For me the main advantage of WebXR is that one can create complex 3D objects at runtime/on the fly without havjbg to load them as assets or compiling them into the binary. Any thougts on the best way to do this in classic runtimes like Unity or Unreal (which scripting plugins, which base construction objects/assets?)? The main issue I have with WebXR, though, is it being canvas-based instead of being page/HTML-based,…

For Unity, I think you can just dynamically load DLLs as long as you're not on a plane form that requires AOT (iOS). Even then, for both Unreal and Unity there are many options to use scripting languages like js or lua or what have you.
Post reply on HN