diff --git a/src/geo/transform.js b/src/geo/transform.js index ed9fc54c54e..fdcfa170379 100644 --- a/src/geo/transform.js +++ b/src/geo/transform.js @@ -181,6 +181,8 @@ class Transform { this._averageElevation = 0; this.cameraElevationReference = "ground"; this._projectionScaler = 1.0; + this.globeCenter = 0; + this.globeCenterInViewSpace = [0, 0, 0]; // Move the horizon closer to the center. 0 would not shift the horizon. 1 would put the horizon at the center. this._horizonShift = 0.1; diff --git a/src/render/painter.js b/src/render/painter.js index a52176cfd5e..bc56b1ab2d5 100644 --- a/src/render/painter.js +++ b/src/render/painter.js @@ -3,7 +3,7 @@ import browser from '../util/browser.js'; import window from '../util/window.js'; -import {mat4, vec3} from 'gl-matrix'; +import {mat4} from 'gl-matrix'; import SourceCache from '../source/source_cache.js'; import EXTENT from '../data/extent.js'; import pixelsToTileUnits from '../source/pixels_to_tile_units.js'; @@ -554,8 +554,7 @@ class Painter { this.opaquePassCutoff = 0; } - const isGlobe = this.transform.projection.name === 'globe'; - if (isGlobe && !this.globeSharedBuffers) { + if (this.transform.projection.name === 'globe' && !this.globeSharedBuffers) { this.globeSharedBuffers = new GlobeSharedBuffers(this.context); }