Giter VIP home page Giter VIP logo

argon-app's Introduction

The ArgonXR Immersive Web Browser

This is the source code for the ArgonXR web browser, an open-standards AR-first browser for iOS and Android. It is available in iTunes for iOS and Google Play for Android

This software was created as part of a research project at the Augmented Environments Lab at Georgia Tech. To support our research, we request that if you make use of this software, you let us know how you used it by sending mail to Blair MacIntyre ([email protected]).

To use ArgonXR, you create web pages using the WebXR Device API and host them on your website.

Build Instructions

  1. Clone this repo to your computer, e.g. to an argon-app directory
  2. Install node
  3. Install nativescript tools via npm i -g nativescript
  4. Execute tns install in the argon-app directory

iOS

  1. Execute tns run ios, or execute tns prepare ios and open argonapp.xcworkspace (located at /argon-app/platforms/ios) in XCode

  2. Debug with javascript inspector using tns debug ios

Android

  1. Execute tns run android

  2. Debug with javascript inspector using tns debug android

Setting up Vuforia

You'll need to build argon-app with your own Vuforia license key to enable the video background and target tracking.

  1. Get a Vuforia license key here: https://library.vuforia.com/articles/Training/Vuforia-License-Manager

  2. Open argon-app/app/config.ts and set DEBUG_VUFORIA_LICENSE_KEY to your key string

Developing

Recommended editor is Visual Studio Code.

Limitations

You will not be able to decrypt ArgonXR Vuforia license key files created with our Vuforia PGP Encryptor, since we do not include the PGP key necessary for decrypting those files here. When you build with your own Vuforia key, it is always used, and encypted PGP keys are ignored.

argon-app's People

Contributors

bionictk avatar blairmacintyre avatar illegalprime avatar jv776 avatar kimberlysiva avatar nshapiro6 avatar speigg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

argon-app's Issues

Open link in new tab

We need an option to open embedded links in a new tab. E.g. the user might press and hold the URL, and an option to open in a new tab would appear.

Need to not use native Alerts for uncaught errors in the web pages

We need to get the console working, and send the errors there. If there's an error in any scripts that runs in the animation loop, it's impossible to do anything except kill argon (since a new error pops up as soon as you kill the previous one).

If we want an alert, we should implement it with some other technique so it doesn't take over the app. It should be tied to the page, not the app.

https does not work with self-signed certs

I just fixed a small bug that was changing "https" to "http". But, once we can access https sites, we still can't access ones that have self-signed certificates ... like argonjs.io! (GitHub uses certs that the browser doesn't like).

We need a UI to manage self-signed certs and probably some plumbing to keep track of things.

ability to hide UI, in landscape mode or otherwise

Playing with the AFrame demos (aframe.io) in mobile Safari, I really like how they switch to full-screen mode when you rotate the phone. There are menus, decoration, etc., in portrait, but nothing in landscape.

At least in Mobile safari. In argon, the URL bar is still there.

We should support this properly. Can someone look into how this works on mobile safari? It would be nice if we could support this, and enable apps to behave like this. This also means we could support typical "cardboard" web apps more cleanly (allowing people to create website that support AR and VR).

Failed to find module: "nativescript-vuforia", relative to: app/tns_modules/

Hi, I'm just starting with NS and I'm experimenting with argon-app for my next project.

My configuration:

  • NativeScript 3.0.3
  • My system: Ubuntu 14.04
  • Occurs on Android
  • Sdks installed: 22, 23, 24, 25 in platforms directory

The app gets built, installed either in emulator or on actual device, but I get this error when I open the app and I can't find a solution.

I suspect this happens for one of the following reasons:

  • different versions of NS ( globally on my computer: 3.0.3, package.json in the project: 2.5.0 )
  • path to the directory in package.json ( directory is not empty )
"nativescript-vuforia": "file:plugins/nativescript-vuforia"

The error:


An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: 
Error calling module function 
Error calling module function 
Error calling module function 
Error: com.tns.NativeScriptException: Failed to find module: "nativescript-vuforia", relative to: app/tns_modules/
    com.tns.Module.resolvePathHelper(Module.java:159)
    com.tns.Module.resolvePath(Module.java:60)
    com.tns.Runtime.runModule(Native Method)
    com.tns.Runtime.runModule(Runtime.java:580)
    com.tns.Runtime.run(Runtime.java:574)
    com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:17)
    android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
    android.app.ActivityThread.handleBindApplication(ActivityThread.java:4793)
    android.app.ActivityThread.access$1900(ActivityThread.java:152)
    android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)
    android.os.Handler.dispatchMessage(Handler.java:102)
    android.os.Looper.loop(Looper.java:135)
    android.app.ActivityThread.main(ActivityThread.java:5538)
    java.lang.reflect.Method.invoke(Native Method)
    java.lang.reflect.Method.invoke(Method.java:372)
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
    com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
File: "<unknown>, line: 1, column: 265
StackTrace: 
    Frame: function:'require', file:'', line: 1, column: 266
    Frame: function:'', file:'file:///data/data/edu.gatech.ael.argon4/files/app/components/common/argon-vuforia-provider.js', line: 4, column: 15
    Frame: function:'require', file:'', line: 1, column: 266
    Frame: function:'', file:'file:///data/data/edu.gatech.ael.argon4/files/app/components/common/AppViewModel.js', line: 7, column: 32
    Frame: function:'require', file:'', line: 1, column: 266
    Frame: function:'', file:'file:///data/data/edu.gatech.ael.argon4/files/app/app.js', line: 29, column: 22
    Frame: function:'require', file:'', line: 1, column: 266
Error: com.tns.NativeScriptException: Failed to find module: "nativescript-vuforia", relative to: app/tns_modules/
    com.tns.Module.resolvePathHelper(Module.java:159)
    com.tns.Module.resolvePath(Module.java:60)
    com.tns.Runtime.runModule(Native Method)
    com.tns.Runtime.runModule(Runtime.java:580)
    com.tns.Runtime.run(Runtime.java:574)
    com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:17)
    android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
    android.app.ActivityThread.handleBindApplication(ActivityThread.java:4793)
    android.app.ActivityThread.access$1900(ActivityThread.java:152)
    android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)
    android.os.Handler.dispatchMessage(Handler.java:102)
    android.os.Looper.loop(Looper.java:135)
    android.app.ActivityThread.main(ActivityThread.java:5538)
    java.lang.reflect.Method.invoke(Native Method)
    java.lang.reflect.Method.invoke(Method.java:372)
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
    com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
File: "<unknown>, line: 1, column: 265
StackTrace: 
    Frame: function:'require', file:'', line: 1, column: 266
    Frame: function:'', file:'file:///data/data/edu.gatech.ael.argon4/files/app/components/common/argon-vuforia-provider.js', line: 4, column: 15
    Frame: function:'require', file:'', line: 1, column: 266
    Frame: function:'', file:'file:///data/data/edu.gatech.ael.argon4/files/app/components/common/AppViewModel.js', line: 7, column: 32
    Frame: function:'require', file:'', line: 1, column: 266
    Frame: function:'', file:'file:///data/data/edu.gatech.ael.argon4/files/app/app.js', line: 29, column: 22
    Frame: function:'require', file:'', line: 1, column: 266
Error: com.tns.NativeScriptException: Failed to find module: "nativescript-vuforia", relative to: app/tns_modules/
    com.tns.Module.resolvePathHelper(Module.java:159)
    com.tns.Module.resolvePath(Module.java:60)
    com.tns.Runtime.runModule(Native Method)
    com.tns.Runtime.runModule(Runtime.java:580)
    com.tns.Runtime.run(Runtime.java:574)
    com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:17)
    android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
    android.app.ActivityThread.handleBindApplication(ActivityThread.java:4793)
    android.app.ActivityThread.access$1900(ActivityThread.java:152)
    android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)
    android.os.Handler.dispatchMessage(Handler.java:102)
    android.os.Looper.loop(Looper.java:135)
    android.app.ActivityThread.main(ActivityThread.java:5538)
    java.lang.reflect.Method.invoke(Native Method)
    java.lang.reflect.Method.invoke(Method.java:372)
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
    com.andro

Any idea how to fix it?

Toggle page visibility

In some cases, a user may want to control which argon pages are visible (when multiple pages are opened). A simple first approach is a toggle to make only the top page visible. All pages will be visible in the carousel, but only the top page will be active on top of the reality. We should add a menu item to toggle between multi and single page AR view.

Hide/Show AR Pages

Right now, if the front page is non-AR, it is shown. And if the front page is AR, all AR pages are shown.

It would be VERY useful in the application to be able to do one or more of the following:

  • hide an individual AR page. Let's say I want to have an app loaded and running, but don't want to see it right now. I'd like to "hide" it. Perhaps this is done in the channel view, and we get a visual feedback of which are hidden (ghosted out? Different header line?). If you select a hidden channel, it comes to the front and becomes unhidden
  • switch between "show all AR pages" and "show only one AR page" mode. Could be a toggle in the menu ("show all AR apps" "show only one AR apps")?

This implies, perhaps, that a new event could be sent to an argon app to tell them if they are visible or hidden. And perhaps when hidden they only get the update Events, not render Events.

argon.js does not work properly in Edge browser

The edge browser appears to be giving argon orientation info, but the orientation data is bad (on my surface book), so it's pointing "down-ish" but not rotating in any reasonable way.

Would be lovely if it used it, but it doesn't appear to work.

Upside-down landscape on Android

If you slowly turn the phone 270 degrees (starting from portrait) landscape will be upside-down.

Also, if you quickly flip the phone 180 degrees from landscape right/left it will sometimes be upside-down.

Rotating to portrait then back to landscape fixes the issue.

Fix custom realities to have separate instances for each requestor

Each page that requests a custom reality should get their own copy.

Right now, they are shared if they have the same URL, but that has two problems:

  • if the reality has state, the different pages may conflict in their usage
  • when we close pages, we don't end up closing the realities

Each page that installs a custom reality should get their own copy. In the reality view, the title of the page should identify the page that requested it AND the type of reality.

We also need to use more descriptive text, not URLs, in this view.

Possible orientation change race conditions

Several pieces of the system need to respond to orientation changes:

  • Action Bar needs to show/hide
  • System UI needs to show/hide (e.g. button bar on Android)
  • Vuforia needs to reconfigure camera background and rendering primitives
  • Argon needs to publish the device state

These events are not instantaneous. For example, if we make changes to the System UI visibility on an orientation change event it will be a few hundred milliseconds before the views have the correct new size.

Currently, we handle this issue with a variety of timeouts, e.g. configuring Vuforia 500ms after an orientation event. There are possible race conditions here, we may want to clean up this logic.

Search the project for setTimeout to find the current fixes.

console errors for custom realities not showing up in console

Running a test, there are console errors if I connect the debugger to my iPhone and look at the console of the custom reality, but they don't show up in the app's console.

We should show them, and possibly in a different color if we can, so people can tell where they are coming from.

need to give feedback when loading page

Right now, if I go to a page (like our samples page) and click on one of the links, I get no feedback until the page loads.

I've received feedback from a few folks that with no "active" progress feedback, it feels like it has crashed or hung

Possible kinds of feedback:

  • something to indicate the click was received to go to the new page. Changing the URL in the url bar immediately helps (we do that), but something else. A spinner or other loading indication? What can we find out from the wkwebview while it's loading? Can we do a load meter somewhere?
  • could we clear the content?

Compass Calibration error

When compass calibration is disabled in a device's settings, the app thinks you are looking straight down, and the AR overlay appears as such, regardless of the direction the devices is pointed in. Allowing the app to access this setting, or notifying the user that the setting is disabled, might be a step in the right direction.

add the ability for a custom reality to show live video

We've talked about giving the app the ability to tell users "Go stand on this spot to get a good AR view" and then fixing the location to the known location at that spot. To do this, we could create a custom reality with a command to set the location.

vuforia tracking data and multiple channels

If I run multiple pages that use Vuforia, there are problems:

  • switching between the pages does not seem to switch which dataset is being tracked (the front one should be used). The last one used seems to continue being used, and the data continuing to be sent to that page
  • if there are multiple pages that use the same target set, all pages get the data. I guess that is fine? I assume the determination is made based on the URL of the dataset?
  • deleting a page using vuforia and going back to a page that was using a different dataset crashes the app.

I understand that there are issues with shutting down and reinitializing vuforia frequently when apps switch around. We may need to consider how to deal with this more creatively (e.g., perhaps we switch to new vuforia contexts when loading new pages, but require the user to switch which page is tracking, perhaps by adding a menu item to a page with Vuforia tracking that says "re-start vuforia" or something). "Robust" is better than "elegant"

URL handling weirdness in "remembering" URLs

If I go to one of the two built in examples URLs (e.g., the Samples), I get the page to select a demo. If I select a demo, it goes to it.

Now, if I tap in the URL bar to bring up the bookmarks again, and tap on the same demo URL (e.g., the Samples), instead of going back to the top level of the samples page, it takes me back to the demo I had selected.

It's like it's not keeping track of the navigation via a URL on the page

URL bar doesn't know what it contains

If I open a page and click on something in the history, I go to that page.

If I select the url bar and the history/bookmark view comes up, and I press return, it goes somewhere else (sometimes to google, sometimes to a previous page I might have visited if I had been using this tab for a while).

add support for BLE controllers

Supporting the Moonshot and/or Daydream controllers would be great. Ideally, we expose them such that they work with the webvr polyfill, as vr controllers.

need to support "target" option on links

If I have a link with a target
<a target="_blank" href=" .... ">
to open a link in a new window/tab, it should open it in a new webview

We should also have a way for the user to decide if we should switch to the new view or not, like other browsers. Default should probably be "switch to the new one".

URL editing should use normal keyboard and do search

We should switch the keyboard to normal editing, and if the entered value does not "Decode" as a valid URL, send the result to a search engine (google, probably).

We should request searching only for docs that have an argon meta tag, and display the resulting page.

can't "go back" to the bookmark page

If I open a new page, I see the bookmark list. If I select a bookmarked page, it goes there, but the bookmark page is not in the "history" so I can't return to it.

Not clear which is correct; desktop Safari lets you go back to the bookmark page.

More visual feedback during loading pages

Right now there is no feedback or progress during loading or refresh. It would be very helpful to have immediate (and ongoing) indication that something is happening

Vuforia doesn't always initialize on page reload

Able to reproduce on an iPhone 6. Run the Vuforia sample and repeatedly reload. About every other load Vuforia will not initialize with the target dataset. It seems that the ar.vuforia.init message is being missed or ignored.

Vuforia Datasets: fetch and open

I can't tell from the code in argon-vuforia-service.js, but if I call NativescriptVuforiaServiceDelegate.prototype.dataSetFetch and then call NativescriptVuforiaServiceDelegate.prototype.dataSetLoad before it finishes, will things work? I'd hope that two http.request() calls for the same file, almost immediately at the same time, would work as expected.

Launch from URL doesn't work on Android (when app is in background)

This seems to require an onNewIntent listener: NativeScript/NativeScript#2747

I've tried extending the com.tns.NativeScriptActivity as suggested in that post, but so far onNewIntent does not fire.

To be clear, the app currently resumes from a URL when the app in the background, but we are not catching the new intent to get the target url.

Be careful about trying to use an existing plugin, e.g. https://github.com/hypery2k/nativescript-urlhandler

On iOS, that plugin implements UIApplicationDelegate, but we also implement this for analytics, and there can only be one delegate.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.