Skip to content

Commit 3f613b1

Browse files
committed
merge upstream dev
2 parents 9c1fd41 + 370477d commit 3f613b1

31 files changed

+335
-79
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.DS_Store
22
.atom-live-server.json
3+
node_modules/*

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
# 2.1.8
2+
3+
- handle y position (height) of content in Location Based, using `position` property of A-FRAME
4+
5+
# 2.1.7
6+
7+
- enhanced `distance` property, now calculating combined distance for latitude/longitude
8+
9+
# 2.1.6
10+
11+
- set distance in `distance` property of `gps-entity-place` (location based) as z axis (previously was x axis)
12+
13+
# 2.1.5
14+
15+
- added `distance` and `distanceMsg` properties to `gps-entity-place` (location based)
16+
- added new example for distance property
17+
- added new example for a `gps-entity-place` that is always facing the user (location based)
18+
- fixed error when source is image or video and not camera
19+
- enhanced docs
20+
121
# 2.1.4
222

323
- fixed wrong positioning of content on markers

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
watch: build
22
fswatch -0 three.js/src/*/*.js aframe/src/*.js babylon.js/src/*.js | xargs -0 -n 1 -I {} make build
33

4+
prepare:
5+
npm install
6+
47
build:
58
cd three.js && make build
69
cd aframe && make build
710

8-
minify:
11+
minify: prepare
912
cd three.js && make minify
1013
cd aframe && make minify
1114

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ You can also use GeoAR.js **without** the script, adding `gps-entity-place` enti
127127
<!doctype HTML>
128128
<html>
129129
<script src="https://aframe.io/releases/1.0.0/aframe.min.js"></script>
130-
<script src="https://raw.githack.com/jeromeetienne/AR.js/2.1.4/aframe/build/aframe-ar.js"></script>
130+
<script src="https://raw.githack.com/jeromeetienne/AR.js/2.1.8/aframe/build/aframe-ar.js"></script>
131131
<body style='margin : 0px; overflow: hidden;'>
132132
<a-scene embedded arjs>
133133
<a-marker preset="hiro">
@@ -185,6 +185,7 @@ Try to get inspired by this great works:
185185
- [Click Places](./aframe/examples/click-places) - set up remote credentials to fetch remote places (`places.js` file)
186186
- [Places Name](./aframe/examples/places-name) - add new places statically on javascript (`places.js` file)
187187
- [Only HTML](./aframe/examples/only-html) - add new places statically on html (`index.html` file)
188+
- [Only HTML](./aframe/examples/always-face-user) - like only-html but here content always face the user (`index.html` file)
188189

189190
# Related Projects
190191
- [Examples inspired from AR.js - not AR.js based](https://github.com/stemkoski/AR-Examples) from [@stemkoski](https://github.com/stemkoski)
@@ -299,6 +300,9 @@ Demo tested on the following browser setups:
299300
- **Safari and Chrome on iOS < 11** (doesn't work, doesn't ask for permission, I see white background and text)
300301
- **Microsoft Edge on Windows 10** (Chrome on Google Pixel phone to view hologram)
301302

303+
To see the full compatibility list and contribute to it yourself go to this google spreadsheet:
304+
[AR.js platform and browser compatibility](https://docs.google.com/spreadsheets/d/1e5YimbF_D1Sou2bx2vdBH58s1WdB_LgzBVYYD_uQLJk/edit#gid=318398375)
305+
302306
Credits: @HelloDeadline, @sorianog
303307

304308
# Licenses

aframe/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
UGLIFY=../node_modules/.bin/uglifyjs
12
watch: build
23
fswatch -0 src/*.js ../three.js/src/*/*.js | xargs -0 -n 1 -I {} make build
34

@@ -11,4 +12,4 @@ build:
1112
> build/aframe-ar.js
1213

1314
minify: build
14-
uglifyjs build/aframe-ar.js > build/aframe-ar.min.js
15+
$(UGLIFY) build/aframe-ar.js > build/aframe-ar.min.js

aframe/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ In addition to that, as you can see on the example above, we also have to add `r
7373
| simulateLongitude | Setting this allows you to simulate the longitude of the camera, to aid in testing. | 0 (disabled) |
7474
| simulateAltitude | Setting this allows you to simulate the altitude of the camera in meters above sea level, to aid in testing. | 0 (disabled) |
7575

76+
7677
### `gps-entity-place`
7778

7879
**Required**: yes
@@ -86,7 +87,10 @@ It requires latitude and longitude as a single string parameter (example with `a
8687
<a-box color="yellow" gps-entity-place="latitude: <your-latitude>; longitude: <your-longitude>"/>
8788
```
8889

89-
You may optionally add an `altitude` parameter, specified in meters above sea level.
90+
| Custom Attribute | Description | Default Value |
91+
|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
92+
| distance | Distance from user, updated at every user position update. Value in meters. | 0 |
93+
| distanceMsg | Distance from user, updated at every user position update. Value as `<distance> meters/kilometers`. | '' |
9094

9195
### `gps-camera-debug`
9296

@@ -96,12 +100,16 @@ You may optionally add an `altitude` parameter, specified in meters above sea le
96100
This component should only be added in development environments, not in production environments.
97101
It shows a debug UI with camera informations and a list of registered `gps-entity-place` entities, showing also distance from the user for each one.
98102

99-
This replaces the `gps-camera`:
100-
101103
```HTML
102104
<a-scene gps-camera-debug embedded arjs='sourceType: webcam; debugUIEnabled: false;'></a-scene>
103105
```
104106

107+
## Tips
108+
109+
### **Content that will always face the user**
110+
111+
Look at [this example](./examples/always-face-user/index.html) in order to create `gps-entity-place` entities that will always face the user (so the user camera).
112+
105113
## Location Based Support
106114

107115
Tried on Huawei P20, works like charm.

0 commit comments

Comments
 (0)