Skip to content

Commit 7cb518a

Browse files
handle position.y if specified
1 parent 3f8ce49 commit 7cb518a

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

aframe/build/aframe-ar.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aframe/build/aframe-ar.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aframe/examples/only-html/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset='utf-8'>
55
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
66
<title>GeoAR.js demo</title>
7-
<script src="https://cdn.jsdelivr.net/gh/aframevr/aframe@1c2407b26c61958baa93967b5412487cd94b290b/dist/aframe-master.min.js"></script>
7+
<script src="https://aframe.io/releases/0.9.2/aframe.min.js"></script>
88
<script src='../../build/aframe-ar.js'></script>
99
<script>
1010
THREEx.ArToolkitContext.baseURL = 'https://raw.githack.com/jeromeetienne/ar.js/master/three.js/'
@@ -17,7 +17,7 @@
1717
embedded
1818
arjs='sourceType: webcam; sourceWidth:1280; sourceHeight:960; displayWidth: 1280; displayHeight: 960; debugUIEnabled: false;'>
1919

20-
<a-box scale="15 15 15" gps-entity-place="latitude: 44.493271; longitude: 11.326040;"></a-box>
20+
<a-box scale="15 15 15" position="0 200 0" gps-entity-place="latitude: 44.493271; longitude: 11.326040;"></a-box>
2121
<a-camera gps-camera rotation-reader>
2222
</a-camera>
2323
</a-scene>

aframe/src/location-based/gps-entity-place.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ AFRAME.registerComponent('gps-entity-place', {
2525
}.bind(this));
2626

2727
window.addEventListener('gps-camera-update-position', function (ev) {
28-
if (!this.data) {
28+
if (!this.data || !this._cameraGps) {
2929
return;
3030
}
3131

@@ -59,7 +59,7 @@ AFRAME.registerComponent('gps-entity-place', {
5959
* @returns {void}
6060
*/
6161
_updatePosition: function () {
62-
var position = { x: 0, y: 0, z: 0 }
62+
var position = { x: 0, y: this.el.getAttribute('position').y || 0, z: 0 }
6363

6464
// update position.x
6565
var dstCoords = {

0 commit comments

Comments
 (0)