File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
aframe/src/new-location-based Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ AFRAME.registerComponent("gps-new-camera", {
3636 init : function ( ) {
3737 this . _testForOrientationControls ( ) ;
3838
39+ this . fakeGpsStarted = false ;
40+
3941 this . threeLoc = new THREEx . LocationBased (
4042 this . el . sceneEl . object3D ,
4143 this . el . object3D ,
@@ -96,6 +98,7 @@ AFRAME.registerComponent("gps-new-camera", {
9698 maximumAge : this . data . gpsTimeInterval ,
9799 } ) ;
98100 if (
101+ ! this . fakeGpsStarted &&
99102 ( this . data . simulateLatitude !== 0 || this . data . simulateLongitude !== 0 ) &&
100103 ( this . data . simulateLatitude != oldData . simulateLatitude ||
101104 this . data . simulateLongitude != oldData . simulateLongitude )
@@ -105,8 +108,7 @@ AFRAME.registerComponent("gps-new-camera", {
105108 this . data . simulateLongitude ,
106109 this . data . simulateLatitude
107110 ) ;
108- this . data . simulateLatitude = 0 ;
109- this . data . simulateLongitude = 0 ;
111+ this . fakeGpsStarted = true ;
110112 }
111113 if ( this . data . simulateAltitude > - Number . MAX_VALUE ) {
112114 this . threeLoc . setElevation ( this . data . simulateAltitude + 1.6 ) ;
You can’t perform that action at this time.
0 commit comments