jagenjo / webglstudio.js

A full open source 3D graphics editor in the browser, with scene editor, coding pad, graph editor, virtual file system, and many features more.
MIT License
5.23k stars 607 forks source link

is webXR supported on WebGL Studio? #41

Open TheBricktop opened 5 years ago

TheBricktop commented 5 years ago

the threejs editor and nunustudi both have native webXR support now, and seeing how webglStudio is another awesome webgl engine im curious if webXr is or will be supported.

jagenjo commented 5 years ago

not in the roadplan but it shouldnt be hard, most of the features are already there.

maybe I give it a try next months

TheBricktop commented 5 years ago

Im very happy to hear that, im very eager to use webGl studio in my following projects.

coderofsalvation commented 4 years ago

This could be a good barebones starting point:

https://immersive-web.github.io/webxr-samples/

particularly:

image

Testing

Concerning testing it, I noticed that firefox is quite serious about webXR these days, their firefox dev-edition has enabled all webxr features by default, and they have a simulator for devs without vr headsets:

https://addons.mozilla.org/en-US/firefox/addon/webxr-api-emulator/

Another option: I've tested firefox webxr with trinus which works well, however I've had to fiddle with the settings a bit. I also had to install steamVR in order to trick firefox into thinking I have real vr headset. This setup works, but I wouldn't recommend it for developing.

Brainstorm: next step

The demo-code above simply enables viewing 3d-scenes on browsers which support webxr (devices, like gyroscope controlled smartphone, or an oculus e.g.). afaik this could just be a 'webxr'-component for webglstudio which detects and forwards the gl-context to webxr. The next step would be controlling the camera and triggering events, which could be done in various ways:

Let me know if I can help, by brainstorming more or by help writing code.

Why is webglstudio+webxr exciting?

Because the metaverse is here :)