Skip to content

Commit 3739ad8

Browse files
committed
build
1 parent f032068 commit 3739ad8

File tree

2 files changed

+42
-36
lines changed

2 files changed

+42
-36
lines changed

aframe/build/aframe-ar-location-only.js

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -816,25 +816,28 @@ AFRAME.registerComponent('gps-camera', {
816816
},
817817

818818
play: function() {
819-
this._watchPositionId = this._initWatchGPS(function (position) {
820-
var localPosition = {
821-
latitude: position.coords.latitude,
822-
longitude: position.coords.longitude,
823-
altitude: position.coords.altitude,
824-
accuracy: position.coords.accuracy,
825-
altitudeAccuracy: position.coords.altitudeAccuracy,
826-
};
827-
819+
if (this.data.simulateLatitude !== 0 && this.data.simulateLongitude !== 0) {
820+
localPosition.latitude = this.data.simulateLatitude;
821+
localPosition.longitude = this.data.simulateLongitude;
828822
if (this.data.simulateAltitude !== 0) {
829823
localPosition.altitude = this.data.simulateAltitude;
830824
}
825+
this.currentCoords = localPosition;
826+
this._updatePosition();
827+
} else {
828+
this._watchPositionId = this._initWatchGPS(function (position) {
829+
var localPosition = {
830+
latitude: position.coords.latitude,
831+
longitude: position.coords.longitude,
832+
altitude: position.coords.altitude,
833+
accuracy: position.coords.accuracy,
834+
altitudeAccuracy: position.coords.altitudeAccuracy,
835+
};
836+
837+
if (this.data.simulateAltitude !== 0) {
838+
localPosition.altitude = this.data.simulateAltitude;
839+
}
831840

832-
if (this.data.simulateLatitude !== 0 && this.data.simulateLongitude !== 0) {
833-
localPosition.latitude = this.data.simulateLatitude;
834-
localPosition.longitude = this.data.simulateLongitude;
835-
this.currentCoords = localPosition;
836-
this._updatePosition();
837-
} else {
838841
this.currentCoords = localPosition;
839842
var distMoved = this._haversineDist(
840843
this.lastPosition,
@@ -848,8 +851,8 @@ AFRAME.registerComponent('gps-camera', {
848851
latitude: this.currentCoords.latitude
849852
};
850853
}
851-
}
852-
}.bind(this));
854+
}.bind(this));
855+
}
853856
},
854857

855858
tick: function () {
@@ -1017,7 +1020,7 @@ AFRAME.registerComponent('gps-camera', {
10171020
if (isPlace && this.data.maxDistance && this.data.maxDistance > 0 && distance > this.data.maxDistance) {
10181021
return Number.MAX_SAFE_INTEGER;
10191022
}
1020-
1023+
10211024
return distance;
10221025
},
10231026

aframe/build/aframe-ar.js

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

0 commit comments

Comments
 (0)