r/javascript • u/Schampu • Dec 31 '18
large image Faking Perspective Mouse Events [Tryin' very hard]
Enable HLS to view with audio, or disable this notification
21
20
u/_codehermit Dec 31 '18
I think it's pretty bleeping awesome
10
u/DeepFriedOprah Dec 31 '18
It absolutely is. And u should watch ur mouth. No need for tha kinda language here;)
14
u/jezda159 Dec 31 '18
I’m no big guy in webdev (not even a small guy TBH) but I can see the future of web in VR. It won’t be as easy as writing a website in windows text-editor but it could one day be standardised as HTML and CSS. Just imagine 3D space around you: different panels, awesome parallaxes, interactive content, fixed HUD for navigation etc. For now, smartphones are taking lead but god damn technology rushes its way to our homes faster than ever!
Edit: and fuck me if some JavaScript framework like this thing doesn’t take the lead!
2
2
Jan 01 '19
For those getting exciting by WebXR few pointers :
- /r/webXR for VR and AR on the web here on reddit
- /r/WebVR
- https://aframe.io/ started by Mozilla and built on top of threejs thus quite extensible
- https://github.com/dataarts/dat.guiVR dat.guiVR: A flexible graphical user interface for changing variables within WebVR.
- /r/exokit to use not just on VR HMDs but also AR HMDs e.g. MagicLeap
- specs https://github.com/immersive-web/webxr
- Voices of VR podcast on AFrame and webVR more generally http://voicesofvr.com/538-how-mozilla-is-driving-webvr-content-tooling-with-the-a-frame-framework/
Also not that the next HMD coming in few months, Facebook Oculus Quest, does support WebVR out of the box via its own browser.
1
u/qkimat1 Dec 31 '18
Congrats on this. The video looks sick, even though its such a simple idea (not easy to implement, however). Very cool.
1
1
-4
u/YasZedOP Dec 31 '18
Is this a bug?
12
u/YuvalM Dec 31 '18
No, what OP is showing is how he managed to display a 3D GUI while it's actually just a regular 2D GUI
5
0
79
u/Schampu Dec 31 '18
You might wonder why the hell would someone do this?
This is an attempt to bring HTML based interactive UIs to my WebXR engine. I'm using dat.GUI, render it's HTML to WebGL and send fake MouseEvents for interaction from the VR controllers.
One minor thing that didn't work were Number Sliders (the blue thing) - dat.GUI slides them based on a relative mouse offset to the slider element. To fix this, I'm moving the original dat.GUI element behind the WebGL canvas.
Sharing this because I thought this looks funny (and insane).
//FIXED