We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d00a73 commit 107b018Copy full SHA for 107b018
three.js/src/location-based/js/location-based.js
@@ -15,6 +15,7 @@ class LocationBased {
15
this.setGpsOptions(options);
16
this.initialPosition = null;
17
this.initialPositionAsOrigin = options.initialPositionAsOrigin || false;
18
+ this.useAltitude = options.useAltitude || false;
19
}
20
21
setProjection(proj) {
@@ -143,6 +144,9 @@ class LocationBased {
143
144
this._camera,
145
position.coords.longitude,
146
position.coords.latitude,
147
+ this.useAltitude && position.coords.altitude != null
148
+ ? position.coords.altitude
149
+ : undefined,
150
);
151
152
if (this._eventHandlers["gpsupdate"]) {
0 commit comments