-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathreadme.txt
46 lines (35 loc) · 2.88 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
=== Augmented Reality ===
Contributors: ryankienstra
Donate link: http://jdrf.org/get-involved/ways-to-donate/
Tags: blocks, augmented-reality
Requires at least: 4.9
Tested up to: 5.1
Stable tag: 0.1.0
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Requires PHP: 7.1
Augmented reality in a WordPress block. Upload any object, and see it in your room using your phone's camera.
== Description ==
![demo-coffee-cup](https://user-images.githubusercontent.com/4063887/52908204-afc42180-3236-11e9-9dc7-cd52718000f9.gif)
This is a [Google Codelab](https://codelabs.developers.google.com/codelabs/ar-with-webxr/index.html) with a block editor back-end (the cup shown above is by [Poly by Google](https://poly.google.com/user/4aEd8rQgKu2)).
It's experimental, and requires an Android device [that can run ARCore](https://developers.google.com/ar/discover/#supported_devices), and earlier versions of Chrome Dev or Canary (70-72). Using older browsers like these is only advisable on a testing device, not your normal phone.
Please see the [Getting Set Up](https://codelabs.developers.google.com/codelabs/ar-with-webxr/index.html#1) section of the Codelab. The files from the Google Codelab are mainly copied from its [GitHub repo](https://github.com/googlecodelabs/ar-with-webxr/tree/7f8b796b546996d522ecd4e22c41d54f58b40778), with slight changes.
**Setup**
1. Find `.obj` and `.mtl` files for a 3D object, like from [Poly](https://poly.google.com/) or [Free3D](https://free3d.com/3d-models/obj-file)
2. In the block (Gutenberg) editor, add an "AR Viewer" block
3. Select the `.obj` and `.mtl` files in the block UI, and click "Save Draft" or "Update":
![ar-block-demo](https://user-images.githubusercontent.com/4063887/52907916-e5660c00-3230-11e9-9f27-b56e3b2d5607.gif)
4. View the front-end of the post
5. Click "Start augmented reality"
6. Rotate the screen until an anchor appears:
![ar-viewer-reticle](https://user-images.githubusercontent.com/4063887/52907208-05da9a00-3222-11e9-87a1-68910476e1e0.gif)
7. Click the anchor, and see the 3d object. The object below is from [Poly](https://poly.google.com/view/1HpVP5w2x1D), created by [Poly by Google](https://poly.google.com/user/4aEd8rQgKu2):
![ar-viewer-cup](https://user-images.githubusercontent.com/4063887/52907215-391d2900-3222-11e9-8a16-74951dd5a433.gif)
== Installation ==
1. Upload the augmented-reality directory to your /wp-content/plugins directory.
1. In the "Plugins" menu, find "Augmented Reality," and click "Activate."
== Changelog ==
= 0.1.0 =
- Adds the "AR Viewer" block, with controls to upload `.obj` and `.mtl` files.
- Implements a [Google Codelab](https://codelabs.developers.google.com/codelabs/ar-with-webxr/index.html), with small changes to its JavaScript files.
- Works on [select Android devices](https://developers.google.com/ar/discover/#supported_devices), with Chrome Dev and Canary 70-72.