Skip to content

Commit 07d9bf5

Browse files
author
Colin McFadden
committed
remove altitude, use y position
1 parent 12e8420 commit 07d9bf5

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

aframe/build/aframe-ar.js

Lines changed: 3 additions & 7 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/src/location-based/gps-entity-place.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ AFRAME.registerComponent('gps-entity-place', {
88
latitude: {
99
type: 'number',
1010
default: 0,
11-
},
12-
altitude: {
13-
type: 'number',
14-
default: 0,
15-
},
11+
}
1612
},
1713
init: function () {
1814
window.addEventListener('gps-camera-origin-coord-set', function () {
@@ -84,8 +80,8 @@ AFRAME.registerComponent('gps-entity-place', {
8480

8581
position.z = this._cameraGps.computeDistanceMeters(this._cameraGps.originCoords, dstCoords, true);
8682
position.z *= this.data.latitude > this._cameraGps.originCoords.latitude ? -1 : 1;
87-
if(this.data.altitude !== 0) {
88-
position.y = this.data.altitude - this._cameraGps.originCoords.altitude;
83+
if(position.y !== 0) {
84+
position.y = position.y - this._cameraGps.originCoords.altitude;
8985
}
9086

9187
// update element's position in 3D world

0 commit comments

Comments
 (0)