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

Documenting offline use #5118

Merged
merged 3 commits into from Sep 19, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Next
Documenting offline use
Pointing out FONT_BASE_URL and MODEL_URLS and the process.
  • Loading branch information
Utopiah committed Sep 19, 2022
commit 4813372f3ffc3c3921d454e8981817a5fdd87dc1
@@ -341,3 +341,6 @@ Phones with Adreno 300 series GPUs are notoriously problematic. Set [renderer pr
[New browser policies](https://www.w3.org/TR/orientation-event/#dom-deviceorientationevent-requestpermission) require sites to prompt the user for permission before getting access to DeviceMotionEvents. [Starting with iOS 13](https://webkit.org/blog/9674/new-webkit-features-in-safari-13/) DeviceMotionEvents are only available for pages served over `https`. Other browsers will also apply same policies and restrictions. A-Frame now [incorporates customizable UI](https://aframe.io/docs/1.0.0/components/device-orientation-permission-ui.html#sidebar) to request the necessary permissions to the user. Make sure to update to [A-Frame latest version](https://github.com/aframevr/aframe/releases)


## Can I use AFrameVR offline?

In some specific context, e.g traveling or exhibition ground with poor connectivity, using AFrame online is not possible. Most of AFrame is self-contained so including it, e.g aframe.min.js, in your project will be sufficient. Some specific parts though are fetched only when used. This is for example the case of the font for text and 3D models for controllers. In order to make an AFrameVR build work either offline or without relying on AFrameVR hosting infrastructure (typically cdn.aframe.io), it is recommended that you monitor network request via the console. This will show precisely what assets are being loaded and thus as required for your specific experience. Fonts can be found via FONT_BASE_URL whereas controllers via MODEL_URLS. Both can be modified either in the source (assuming you apply your own customizations) or directly in the build file if you use it as-is.