Skip to content

Commit

Permalink
Simplify + Lint
Browse files Browse the repository at this point in the history
Fixup
  • Loading branch information
karimnaaji committed Apr 21, 2022
1 parent 435492a commit 8bd2a5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/geo/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions src/render/painter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 8bd2a5f

Please sign in to comment.