From e4dbb3e601e863aa9fc309c6a315e6a81821f333 Mon Sep 17 00:00:00 2001 From: Thomas Zachariah Date: Tue, 13 Aug 2019 16:51:59 -0700 Subject: [PATCH] Add README & update keywords --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 9 ++++++--- plugin.xml | 2 +- 3 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..d392001 --- /dev/null +++ b/README.md @@ -0,0 +1,50 @@ +# Cordova WebXR Plugin + +Add augmented reality content to your app using the WebXR Device API (well, [Mozilla's version](https://github.com/mozilla/webxr-polyfill/)). + +This is intended to support all content that is viewable in [Mozilla's iOS WebXR Viewer](https://apps.apple.com/us/app/webxr-viewer/id1295998056). + + +## Installation + +Install using the Apache Cordova command line: + + cordova plugin add cordova-plugin-webxr + +This plugin can only be used on ARKit-compatible devices and requires an iOS Deployment Target of 12.0 or higher. +Make sure to adjust the project config.xml accordingly, e.g: + + + + + + +## Try It Out + +To test some interactive AR content, set the default source in the project's config.xml to [Mozilla's examples site](https://webxr-ios.webxrexperiments.com/): + + + +The source code for the examples can be found in Mozilla's [webxr-ios-js repo](https://github.com/MozillaReality/webxr-ios-js/tree/develop/examples) + + +## NOTE: Mozilla WebXR ≠ W3C WebXR (yet) +Mozilla's version of the API is substantially different from the W3C draft spec. +They plan to align their's with the W3C spec once it has matured. + + +## Dependencies + +- **iOS 12.0 / ARKit**: The plugin can only be used on ARKit-compatible devices and requires an iOS Deployment Target of 12.0 or higher. + +- **User Agent**: The plugin relies on the `AppendUserAgent` preference value. If you plan to override the value in config.xml, ensure it includes "WebXRViewer", e.g:
+` ` + +- **Swift Version**: The iOS source code assumes Swift 4.0. It will automatically install `cordova-plugin-add-swift-support`, if it is not already present. + +- **WKWebView**: The plugin requires WKWebView. It will automatically install `cordova-plugin-wkwebview-engine`, if not already in use. + + +## Credits + +This plugin is based on the source for Mozilla's WebXR Viewer ([webxr-ios@d3485fb](https://github.com/mozilla-mobile/webxr-ios/tree/d3485fb65fae52bcfb925cf5feeecca0f66f6f47)) \ No newline at end of file diff --git a/package.json b/package.json index 7220042..3e06125 100644 --- a/package.json +++ b/package.json @@ -12,14 +12,17 @@ "ar", "vr", "xr", - "w3c", + "w3c", "arkit", + "webar", + "webvr", "webxr", "mozilla", "polyfill", - "immersive web", - "virtual reality", "augmented reality", + "virtual reality", + "mixed reality", + "immersive web", "ecosystem:cordova", "cordova-android", "cordova-ios" diff --git a/plugin.xml b/plugin.xml index 05b4c4d..e6c8a65 100644 --- a/plugin.xml +++ b/plugin.xml @@ -3,7 +3,7 @@ WebXR Plugin Thomas Zachariah Apache 2.0 - webxr, immersive web, mozilla, w3c, polyfill, xr, augmented reality, ar, virtual reality, vr, arkit + webxr, webar, webvr, immersive web, mixed reality, xr, augmented reality, ar, virtual reality, vr, arkit, mozilla, w3c, polyfill