Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to make this work with current state of WebXR #186

Open
Noltibus opened this issue Jun 23, 2020 · 8 comments
Open

Trying to make this work with current state of WebXR #186

Noltibus opened this issue Jun 23, 2020 · 8 comments

Comments

@Noltibus
Copy link

I checked out the repo and tried the master as well as the develop branch. Both of these branches navigate to the site webxr-ios.webxrexperiences.com, which is also the default site for the current version of WebXR Viewer on Apple Store. The version on the App Store is able to run the examples from the site with no difficulties, however, the version in this repository is not. After I click on the Go Button, absolutely nothing happens. Is there any way to make it work, any diff to the current Firefox sources to just make the examples work? All I want to achieve is an iOS app with a single web view, opening an HTML file containing one of the simplest AR examples.

@blairmacintyre
Copy link
Contributor

The current code is in the webxr branch of the Firefox for iOS source repo (https://github.com/mozilla-mobile/firefox-ios/tree/webxr)

It should be possible to make the current polyfill (in https://github.com/mozillareality/webxr-ios-js) work with this app, but I haven't tried. If you want to build your own app based on some code, that would be your best bet; the firefox code is far more complicated.

@Noltibus
Copy link
Author

Any basic tutorials or tips on how to build a working webview containing an AR sample, ie. the teapot example?

@blairmacintyre
Copy link
Contributor

What do you mean "build a working webview"?

Is your goal to embed a webview into another app? If so, no we don't have a tutorial; it's quite complicated. Most of this app is devoted to this, the "browser" part is pretty minimal.

@Noltibus
Copy link
Author

Yes, I want to embed a webview into a basic iOS app, no other functionality is needed. Just the webview containing the teapot example. The main code of this app is devoted to it, I know, but there aren't any hints on why it is not working with the current examples, are there?

@blairmacintyre
Copy link
Contributor

I honestly can't recall what we changed; the basic communication between the app and the javascript is the same, I suspect there are some differences in the handshaking per frame, initialization and teardown (in terms of timing). We stripped out a ton of extra code from the polyfill when we restructured it to be based on the official polyfill, and then again when we moved it to Firefox.

I'm not sure if looking through the commit history of the polyfill will help, but it may.

@vithias
Copy link

vithias commented Jun 29, 2020

Slightly tangential, but are those experiments at the webxr-ios link AR only or are there also experiments demonstrating a VR view? On the immersive-web page here(https://immersive-web.github.io/webxr-samples/), the samples just bring up a dialogue that says "VR not found", as opposed to Chrome on Android, which would say "Enter VR". This happens even though the immersive-web page says that the WebXR Viewer browser is WebXR enabled(green check mark). Is this behavior expected?

Everything written above is with the most current version of the Mozilla WebXR Viewer on the App Store.

@blairmacintyre
Copy link
Contributor

These experiments we wrote are AR only; the webxr viewer (for which they were written) only support immersive-ar mode, which is valid for WebXR (any given browser does not need to support both AR and VR -- you won't see AR on the Oculus Quest, for example).

I personally would love to have the WebXR Viewer support VR; it would be perfect feasible to do it, but having immersive VR mode that does side-by-side rendering without showing the camera video, exposes two views, and uses the AR tracker for smooth motion. If someone wanted to implement this and do a PR against https://github.com/mozillareality/webxr-ios-js we could include it!

@ivnnv
Copy link

ivnnv commented Nov 10, 2020

sorry for the +1, but commenting for also getting notified when theres some updates on this. I will also love to have VR support on the iOS app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants