Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

feat(globe): larger halo; globe controls fixes (#3621)

Igor Dykhta997cba298d1b
diff --git a/.cursor/rules/no-auto-commit-push.mdc b/.cursor/rules/no-auto-commit-push.mdc
index 2eff70623..a3537972c 100644
--- a/.cursor/rules/no-auto-commit-push.mdc
+++ b/.cursor/rules/no-auto-commit-push.mdc
@@ -15,8 +15,10 @@ the user has explicitly asked for that action in the current turn.
- Making local file edits is fine. Staging (`git add`) for inspection is fine.
- Before committing or pushing, ask the user to confirm and wait for approval.
- Never use `--no-verify` or bypass pre-commit / pre-push hooks.
-- If the user says something ambiguous like "fix the tests", stop after the fix
- and ask whether they want it committed/pushed — do not assume.
+- If the user says something ambiguous like "fix the tests", "fix 1 and 2",
+ "address the PR comments", or "update the defaults", stop after the code
+ change and ask whether they want it committed/pushed — do not assume.
+- Working on an open PR branch does **not** imply permission to commit or push.
## Example
@@ -25,6 +27,10 @@ the user has explicitly asked for that action in the current turn.
<fix the test>
git commit -m "fix test" && git push // committed without being asked
+// ❌ BAD: user asked to fix review findings
+<Fix 1 - cap radius. Fix 2 - update defaults.>
+git commit && git push // still not an explicit commit request
+
// ✅ GOOD
<fix the test>
"The fix is ready. Want me to commit and push it to the PR branch?"
diff --git a/docs/user-guides/m-map-settings.md b/docs/user-guides/m-map-settings.md
index 895ea5a38..d61ffc36f 100644
--- a/docs/user-guides/m-map-settings.md
+++ b/docs/user-guides/m-map-settings.md
@@ -136,6 +136,12 @@ slider:
- __Atmosphere__ — the glowing halo rendered around the globe. Turning it off
also hides its sub-settings:
+ - __Huge Halo__ — adds a large uniform glow around the globe on top of the
+ realistic atmosphere halo (view-independent, thick soft aura). Enabled by
+ default.
+ - __Halo Radius__ — multiplier for how far the glow extends beyond the globe
+ (`1` = baseline thickness; default is `3.5`).
+ - __Halo Opacity__ — opacity of the huge halo (0–1; default is `0.2`).
- __Day/Night (terminator)__ — shades the night side of the globe. The slider
controls the shading opacity.
- __Sun azimuth__ — direction of the sun used for the day/night shading. The
@@ -148,6 +154,7 @@ slider:
- __Surface__ — the color of the globe's land surface.
- __Background__ — the color of the empty space rendered around the globe. This
color is also used as the background in image and video export.
+- __Stars__ — a starfield behind the globe. Enabled by default.
### Known issues and limitations
diff --git a/src/components/src/side-panel/map-style-panel/globe-config-panel.tsx b/src/components/src/side-panel/map-style-panel/globe-config-panel.tsx
index d97c1dd07..c79086348 100644
--- a/src/components/src/side-panel/map-style-panel/globe-config-panel.tsx
+++ b/src/components/src/side-panel/map-style-panel/globe-config-panel.tsx
@@ -5,7 +5,7 @@ import React, {useCallback} from 'react';
import styled, {css} from 'styled-components';
import {MapState, RGBColor} from '@kepler.gl/types';
-import {GlobeConfig} from '@kepler.gl/constants';
+import {GlobeConfig, DEFAULT_GLOBE_CONFIG} from '@kepler.gl/constants';
import {FormattedMessage} from '@kepler.gl/localization';
import {EyeSeen, EyeUnseen} from '../../common/icons';
@@ -21,6 +21,11 @@ import LayerGroupColorPickerFactory from './map-layer-group-color-picker';
const StyledGlobeConfigPanel = styled.div`
padding-bottom: 6px;
+
+ /* Give slider/color controls more horizontal room. */
+ .side-panel-panel__content {
+ padding-right: 2px;
+ }
`;
const StyledConfigRow = styled.div`
@@ -49,6 +54,20 @@ const SliderWrapper = styled.div<{$enabled?: boolean}>`
${props => (props.$enabled ? '' : disableSlider)}
`;
+// Atmosphere slider rows: shrink the numeric inputs by 5px so the track can use
+// the extra space (default theme.sliderInputWidth is 56).
+const AtmosphereSliderWrapper = styled(SliderWrapper)`
+ input {
+ width: ${props => props.theme.sliderInputWidth - 5}px;
+ }
+`;
+
+// Keep color swatches slightly inset from the panel edge (sliders already get
+// inset from their numeric inputs; swatches need an explicit margin).
+const ColorPickerSlot = styled.div`
+ margin-right: 10px;
+`;
+
// Slider rows (Day/Night, Sun Azimuth) put the label and the slider side by side.
// Give the label only the width its (short) text needs so the slider gets the
// rest of the row. The child indent is kept small (~half an eye-icon width) so the
@@ -157,6 +176,72 @@ function GlobeConfigPanelFactory(
</PanelLabelWrapper>
</StyledConfigRow>
+ {/* Huge Halo (child of atmosphere) — additive soft glow on top of realistic halo */}
+ <ChildRow>
+ <PanelLabelWrapper>
+ <PanelHeaderAction
+ className="layer-group__visibility-toggle"
+ id="globe-huge-halo-toggle"
+ tooltip={globeConfig.hugeHalo ? 'tooltip.hide' : 'tooltip.show'}
+ onClick={() => onToggle('hugeHalo', undefined, 'atmosphere')}
+ IconComponent={globeConfig.hugeHalo ? EyeSeen : EyeUnseen}
+ active={Boolean(globeConfig.hugeHalo && globeConfig.atmosphere)}
+ flush
+ />
+ <LayerLabel $active={Boolean(globeConfig.hugeHalo && globeConfig.atmosphere)}>
+ <FormattedMessage id="mapLayers.hugeHalo" />
+ </LayerLabel>
+ </PanelLabelWrapper>
+ </ChildRow>
+
+ {/* Huge Halo radius multiplier */}
+ <SliderRow>
+ <PanelLabelWrapper>
+ <LayerLabel
+ $active={Boolean(globeConfig.hugeHalo && globeConfig.atmosphere)}
+ style={{paddingLeft: 28}}
+ >
+ <FormattedMessage id="mapLayers.hugeHaloRadius" />
+ </LayerLabel>
+ </PanelLabelWrapper>
+ <AtmosphereSliderWrapper $enabled={Boolean(globeConfig.hugeHalo && globeConfig.atmosphere)}>
+ <RangeSlider
+ range={[0.5, 3.5]}
+ value0={0}
+ value1={globeConfig.hugeHaloRadius ?? DEFAULT_GLOBE_CONFIG.hugeHaloRadius}
+ step={0.05}
+ isRanged={false}
+ onChange={val => onSliderChange('hugeHaloRadius', val)}
+ inputTheme="secondary"
+ showInput
+ />
+ </AtmosphereSliderWrapper>
+ </SliderRow>
+
+ {/* Huge Halo opacity */}
+ <SliderRow>
+ <PanelLabelWrapper>
+ <LayerLabel
+ $active={Boolean(globeConfig.hugeHalo && globeConfig.atmosphere)}
+ style={{paddingLeft: 28}}
+ >
+ <FormattedMessage id="mapLayers.hugeHaloOpacity" />
+ </LayerLabel>
+ </PanelLabelWrapper>
+ <AtmosphereSliderWrapper $enabled={Boolean(globeConfig.hugeHalo && globeConfig.atmosphere)}>
+ <RangeSlider
+ range={[0, 1]}
+ value0={0}
+ value1={globeConfig.hugeHaloOpacity ?? DEFAULT_GLOBE_CONFIG.hugeHaloOpacity}
+ step={0.01}
+ isRanged={false}
+ onChange={val => onSliderChange('hugeHaloOpacity', val)}
+ inputTheme="secondary"
+ showInput
+ />
+ </AtmosphereSliderWrapper>
+ </SliderRow>
+
{/* Terminator (child of atmosphere) */}
<SliderRow>
<PanelLabelWrapper>
@@ -173,7 +258,7 @@ function GlobeConfigPanelFactory(
<FormattedMessage id="mapLayers.terminator" />
</LayerLabel>
</PanelLabelWrapper>
- <SliderWrapper $enabled={globeConfig.terminator && globeConfig.atmosphere}>
+ <AtmosphereSliderWrapper $enabled={globeConfig.terminator && globeConfig.atmosphere}>
<RangeSlider
range={[0, 1]}
value0={0}
@@ -184,7 +269,7 @@ function GlobeConfigPanelFactory(
inputTheme="secondary"
showInput
/>
- </SliderWrapper>
+ </AtmosphereSliderWrapper>
</SliderRow>
{/* Sun Azimuth (child of atmosphere) */}
@@ -203,7 +288,7 @@ function GlobeConfigPanelFactory(
<FormattedMessage id="mapLayers.sunAzimuth" />
</LayerLabel>
</PanelLabelWrapper>
- <SliderWrapper $enabled={globeConfig.azimuth && globeConfig.atmosphere}>
+ <AtmosphereSliderWrapper $enabled={globeConfig.azimuth && globeConfig.atmosphere}>
<RangeSlider
range={[0, 360]}
value0={0}
@@ -214,7 +299,7 @@ function GlobeConfigPanelFactory(
inputTheme="secondary"
showInput
/>
- </SliderWrapper>
+ </AtmosphereSliderWrapper>
</SliderRow>
{/* Basemap */}
@@ -251,13 +336,15 @@ function GlobeConfigPanelFactory(
<FormattedMessage id="mapLayers.label" />
</LayerLabel>
</PanelLabelWrapper>
- <LayerGroupColorPicker
- slug="globe-labels"
- color={globeConfig.labelsColor}
- onColorChange={(color: RGBColor) => onColorChange('labelsColor', color)}
- extraMarginRight={false}
- disabled={!(globeConfig.labels && globeConfig.basemap)}
- />
+ <ColorPickerSlot>
+ <LayerGroupColorPicker
+ slug="globe-labels"
+ color={globeConfig.labelsColor}
+ onColorChange={(color: RGBColor) => onColorChange('labelsColor', color)}
+ extraMarginRight={true}
+ disabled={!(globeConfig.labels && globeConfig.basemap)}
+ />
+ </ColorPickerSlot>
</ChildRow>
{/* Admin Lines (child of basemap) */}
@@ -276,13 +363,15 @@ function GlobeConfigPanelFactory(
<FormattedMessage id="mapLayers.adminBorders" />
</LayerLabel>
</PanelLabelWrapper>
- <LayerGroupColorPicker
- slug="globe-admin"
- color={globeConfig.adminLinesColor}
- onColorChange={(color: RGBColor) => onColorChange('adminLinesColor', color)}
- extraMarginRight={false}
- disabled={!(globeConfig.adminLines && globeConfig.basemap)}
- />
+ <ColorPickerSlot>
+ <LayerGroupColorPicker
+ slug="globe-admin"
+ color={globeConfig.adminLinesColor}
+ onColorChange={(color: RGBColor) => onColorChange('adminLinesColor', color)}
+ extraMarginRight={true}
+ disabled={!(globeConfig.adminLines && globeConfig.basemap)}
+ />
+ </ColorPickerSlot>
</ChildRow>
{/* Water (child of basemap) */}
@@ -301,13 +390,15 @@ function GlobeConfigPanelFactory(
<FormattedMessage id="mapLayers.water" />
</LayerLabel>
</PanelLabelWrapper>
- <LayerGroupColorPicker
- slug="globe-water"
- color={globeConfig.waterColor}
- onColorChange={(color: RGBColor) => onColorChange('waterColor', color)}
- extraMarginRight={false}
- disabled={!(globeConfig.water && globeConfig.basemap)}
- />
+ <ColorPickerSlot>
+ <LayerGroupColorPicker
+ slug="globe-water"
+ color={globeConfig.waterColor}
+ onColorChange={(color: RGBColor) => onColorChange('waterColor', color)}
+ extraMarginRight={true}
+ disabled={!(globeConfig.water && globeConfig.basemap)}
+ />
+ </ColorPickerSlot>
</ChildRow>
{/* Globe Surface (always visible, only has color) */}
@@ -317,13 +408,15 @@ function GlobeConfigPanelFactory(
<FormattedMessage id="mapLayers.surface" />
</LayerLabel>
</PanelLabelWrapper>
- <LayerGroupColorPicker
- slug="globe-surface"
- color={globeConfig.surfaceColor}
- onColorChange={(color: RGBColor) => onColorChange('surfaceColor', color)}
- extraMarginRight={false}
- disabled={false}
- />
+ <ColorPickerSlot>
+ <LayerGroupColorPicker
+ slug="globe-surface"
+ color={globeConfig.surfaceColor}
+ onColorChange={(color: RGBColor) => onColorChange('surfaceColor', color)}
+ extraMarginRight={true}
+ disabled={false}
+ />
+ </ColorPickerSlot>
</StyledConfigRow>
{/* Background (empty space around the globe, always visible) */}
@@ -333,13 +426,15 @@ function GlobeConfigPanelFactory(
<FormattedMessage id="mapLayers.background" />
</LayerLabel>
</PanelLabelWrapper>
- <LayerGroupColorPicker
- slug="globe-background"
- color={globeConfig.backgroundColor}
- onColorChange={(color: RGBColor) => onColorChange('backgroundColor', color)}
- extraMarginRight={false}
- disabled={false}
- />
+ <ColorPickerSlot>
+ <LayerGroupColorPicker
+ slug="globe-background"
+ color={globeConfig.backgroundColor}
+ onColorChange={(color: RGBColor) => onColorChange('backgroundColor', color)}
+ extraMarginRight={true}
+ disabled={false}
+ />
+ </ColorPickerSlot>
</StyledConfigRow>
{/* Stars (rendered behind the globe in 3D space) */}
diff --git a/src/constants/src/default-settings.ts b/src/constants/src/default-settings.ts
index 4c0fe627d..c63597394 100644
--- a/src/constants/src/default-settings.ts
+++ b/src/constants/src/default-settings.ts
@@ -1383,6 +1383,18 @@ export const GLOBE_MAX_LATITUDE = 75;
export type GlobeConfig = {
atmosphere: boolean;
+ /**
+ * When true, draw a large sun-independent uniform glow in addition to the
+ * realistic scattering sky halo.
+ */
+ hugeHalo: boolean;
+ /**
+ * Multiplier for huge-halo shell thickness. `1` is the baseline (~14% beyond
+ * the globe); the configured default is 3.5.
+ */
+ hugeHaloRadius: number;
+ /** Opacity of the huge-halo glow (0–1). Default: 0.2. */
+ hugeHaloOpacity: number;
azimuth: boolean;
azimuthAngle: number;
terminator: boolean;
@@ -1407,6 +1419,9 @@ export type Globe = {
export const DEFAULT_GLOBE_CONFIG: GlobeConfig = {
atmosphere: true,
+ hugeHalo: true,
+ hugeHaloRadius: 3.5,
+ hugeHaloOpacity: 0.2,
azimuth: false,
azimuthAngle: 45,
terminator: true,
@@ -1423,7 +1438,8 @@ export const DEFAULT_GLOBE_CONFIG: GlobeConfig = {
// Color of the empty space rendered around the globe (deck.gl clear color).
// Matches the previous hardcoded clear color [0.015, 0.035, 0.065] in 0-1 space.
backgroundColor: [4, 9, 17],
- stars: false
+ // Starfield behind the globe is on by default in globe view.
+ stars: true
};
export const GLOBE_SUPPORTED_LAYERS: Record<string, boolean> = {
diff --git a/src/deckgl-layers/src/globe/atmosphere-layer.ts b/src/deckgl-layers/src/globe/atmosphere-layer.ts
index adaae5705..6c01553a4 100644
--- a/src/deckgl-layers/src/globe/atmosphere-layer.ts
+++ b/src/deckgl-layers/src/globe/atmosphere-layer.ts
@@ -11,7 +11,7 @@ import {SphereGeometry} from '@luma.gl/engine';
import {Vector3} from '@math.gl/core';
import {getSunPosition} from '@math.gl/sun';
-import type {GlobeConfig} from '@kepler.gl/constants';
+import {DEFAULT_GLOBE_CONFIG, type GlobeConfig} from '@kepler.gl/constants';
const toRadians = (degrees: number): number => (degrees * Math.PI) / 180;
@@ -35,6 +35,13 @@ const GLOBE_MESH_OUTER = new SphereGeometry({
nlong: 100
});
+// ~14% larger than the globe surface mesh — yields a thick soft aura (~0.1–0.15R).
+const GLOBE_MESH_HUGE_HALO = new SphereGeometry({
+ radius: 7.3e6,
+ nlat: 100,
+ nlong: 100
+});
+
const [lon, lat] = [0, 90];
const sunPosNow = getSunPosition(Date.now(), lat, lon);
const v3SunPosNow = angleToSunPos(sunPosNow.azimuth + Math.PI);
@@ -351,6 +358,117 @@ const ATMOSPHERE_SKY_PARAMETERS = {
blendEquation: [0x8006, 0x8006]
};
+/**
+ * Soft, sun-independent glow. Radii are in deck.gl common space
+ * (GLOBE_COMMON_RADIUS = 256; atmosphere uses ~258 as a slight fudge).
+ * Outer ≈ 14% larger than inner at radius multiplier = 1 (matches the base mesh).
+ */
+const HUGE_HALO_INNER_RADIUS = 258;
+const HUGE_HALO_BASE_OUTER_RADIUS = 294;
+const HUGE_HALO_BASE_SHELL = HUGE_HALO_BASE_OUTER_RADIUS - HUGE_HALO_INNER_RADIUS;
+/** Matches the Halo Radius slider max; higher values can produce a black-disc artifact. */
+const HUGE_HALO_RADIUS_MAX = 3.5;
+
+const HUGE_HALO_UNIFORMS = {
+ fInnerRadius: HUGE_HALO_INNER_RADIUS,
+ // Soft cyan matching the reference huge-halo look.
+ v3HaloColor: [0.45, 0.72, 1.0],
+ fHaloIntensity: 1.0
+};
+
+const HUGE_HALO_PARAMETERS = {
+ cullFace: 0x0404, // GL.FRONT
+ depthMask: false,
+ // Large shells often enclose the camera; disable depth so the ring still draws.
+ depthTest: false,
+ blendFunc: [0x0302, 0x0303, 1, 0x0303], // SRC_ALPHA, ONE_MINUS_SRC_ALPHA
+ blendEquation: [0x8006, 0x8006]
+};
+
+function resolveHugeHaloRadius(config: GlobeConfig): number {
+ const multiplier = Number.isFinite(config.hugeHaloRadius)
+ ? (config.hugeHaloRadius as number)
+ : DEFAULT_GLOBE_CONFIG.hugeHaloRadius;
+ // Scale shell thickness; keep outer above the planet surface.
+ return (
+ HUGE_HALO_INNER_RADIUS +
+ HUGE_HALO_BASE_SHELL * Math.max(Math.min(multiplier, HUGE_HALO_RADIUS_MAX), 0.05)
+ );
+}
+
+function resolveHugeHaloOpacity(config: GlobeConfig): number {
+ const opacity = Number.isFinite(config.hugeHaloOpacity)
+ ? (config.hugeHaloOpacity as number)
+ : DEFAULT_GLOBE_CONFIG.hugeHaloOpacity;
+ return Math.max(0, Math.min(1, opacity));
+}
+
+/**
+ * View-independent atmosphere: a large uniform emissive aura around the globe.
+ * Unlike AtmosphereSkyLayerRealistic, this ignores sun direction and uses a
+ * linear radial falloff through a thick shell (max at the surface → 0 at outer radius).
+ */
+export class AtmosphereHugeHaloLayer extends SimpleMeshLayer<any, AtmosphereLayerProps> {
+ static layerName = 'AtmosphereHugeHaloLayer';
+
+ draw({uniforms}: {uniforms: object}): void {
+ const {config, zoomFade} = this.props;
+ const model = this.state.model;
+ if (model) {
+ (model as any).props.uniforms = {
+ ...(model as any).props.uniforms,
+ ...HUGE_HALO_UNIFORMS,
+ fHaloOpacity: resolveHugeHaloOpacity(config),
+ fAtmosphereZoomFade: zoomFade
+ };
+ }
+ super.draw({uniforms});
+ }
+
+ getShaders(): any {
+ return {
+ ...super.getShaders(),
+ inject: {
+ 'fs:#decl': `
+ uniform float fInnerRadius;
+ uniform vec3 v3HaloColor;
+ uniform float fHaloIntensity;
+ uniform float fHaloOpacity;
+ uniform float fAtmosphereZoomFade;
+ `,
+ 'fs:#main-end': `
+ vec3 v3CameraPos = cameraPosition;
+ vec3 v3Pos = position_commonspace.xyz;
+ // Outer radius from the actual mesh vertex so sizeScale stays in sync.
+ float fOuterRadius = length(v3Pos);
+ vec3 v3Ray = normalize(v3Pos - v3CameraPos);
+
+ // Impact parameter of the view ray (perpendicular distance from globe
+ // center to the ray). Stable when the camera is inside the outer shell,
+ // unlike near/far sphere-intersection math which breaks in that case
+ // and produced a black disc at high radius multipliers.
+ float fDMin = length(cross(v3CameraPos, v3Ray));
+
+ // Linear falloff in the annulus only: max at the surface, zero at outer.
+ float fShell = max(fOuterRadius - fInnerRadius, 0.0001);
+ float fGlow = 0.0;
+ if (fDMin >= fInnerRadius && fDMin < fOuterRadius) {
+ float t = (fDMin - fInnerRadius) / fShell;
+ fGlow = 1.0 - t;
+ }
+
+ fGlow *= fHaloIntensity;
+
+ // Straight alpha (not premultiplied) for SRC_ALPHA blending.
+ fragColor = vec4(v3HaloColor, fGlow * fHaloOpacity);
+ fragColor.a *= fAtmosphereZoomFade;
+ `,
+ 'fs:DECKGL_FILTER_COLOR': ``
+ }
+ };
+ }
+}
+
export const getGlobeAtmosphereLayer = ({config, zoom}: {config: GlobeConfig; zoom?: number}) => {
const zoomFade = atmosphereZoomFade(zoom ?? 0);
return new AtmosphereLayerRealistic({
@@ -367,6 +485,7 @@ export const getGlobeAtmosphereLayer = ({config, zoom}: {config: GlobeConfig; zo
});
};
+/** Realistic sun-lit scattering sky halo (thin limb glow). */
export const getGlobeAtmosphereSkyLayer = ({config, zoom}: {config: GlobeConfig; zoom?: number}) => {
const zoomFade = atmosphereZoomFade(zoom ?? 0);
return new AtmosphereSkyLayerRealistic({
@@ -382,3 +501,30 @@ export const getGlobeAtmosphereSkyLayer = ({config, zoom}: {config: GlobeConfig;
parameters: ATMOSPHERE_SKY_PARAMETERS
});
};
+
+/**
+ * Large uniform glow drawn in addition to the realistic sky halo when
+ * `config.hugeHalo` is enabled. Returns null when disabled.
+ */
+export const getGlobeHugeHaloLayer = ({config, zoom}: {config: GlobeConfig; zoom?: number}) => {
+ if (!config.hugeHalo) {
+ return null;
+ }
+ const zoomFade = atmosphereZoomFade(zoom ?? 0);
+ const outerRadius = resolveHugeHaloRadius(config);
+ // Keep mesh extent in sync with the desired outer radius (base mesh = default outer).
+ const sizeScale = outerRadius / HUGE_HALO_BASE_OUTER_RADIUS;
+ return new AtmosphereHugeHaloLayer({
+ id: 'atmosphere-huge-halo',
+ data: [[0, 0, 0]],
+ config,
+ zoomFade,
+ coordinateOrigin: [0, 0, 0],
+ coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
+ getPosition: ((d: number[]) => d) as any,
+ getColor: [0, 0, 0],
+ mesh: GLOBE_MESH_HUGE_HALO,
+ sizeScale,
+ parameters: HUGE_HALO_PARAMETERS
+ });
+};
diff --git a/src/deckgl-layers/src/globe/globe-layers.ts b/src/deckgl-layers/src/globe/globe-layers.ts
index 50fd96239..140822609 100644
--- a/src/deckgl-layers/src/globe/globe-layers.ts
+++ b/src/deckgl-layers/src/globe/globe-layers.ts
@@ -8,7 +8,7 @@ import {TileLayer, MVTLayer} from '@deck.gl/geo-layers';
import type {Globe} from '@kepler.gl/constants';
import type {RGBColor} from '@kepler.gl/types';
-import {getGlobeAtmosphereLayer, getGlobeAtmosphereSkyLayer} from './atmosphere-layer';
+import {getGlobeAtmosphereLayer, getGlobeAtmosphereSkyLayer, getGlobeHugeHaloLayer} from './atmosphere-layer';
import {getGlobeDepthDiskLayer} from './globe-depth-disk-layer';
import {MVTLabelLayer} from './mvt-label-layer';
@@ -540,6 +540,8 @@ export const getGlobeBaseLayers = ({
const hasTileAccess = useCarto || Boolean(mapboxApiAccessToken);
return [
+ // Huge halo behind the thin realistic limb so both can be visible together.
+ config.atmosphere ? getGlobeHugeHaloLayer({config, zoom}) : null,
config.atmosphere ? getGlobeAtmosphereSkyLayer({config, zoom}) : null,
// Depth-only cross-section disk: writes depth at the globe's silhouette so
diff --git a/src/deckgl-layers/src/globe/index.ts b/src/deckgl-layers/src/globe/index.ts
index 483d7b23e..5c38e89f2 100644
--- a/src/deckgl-layers/src/globe/index.ts
+++ b/src/deckgl-layers/src/globe/index.ts
@@ -19,8 +19,10 @@
export {
AtmosphereLayerRealistic,
AtmosphereSkyLayerRealistic,
+ AtmosphereHugeHaloLayer,
getGlobeAtmosphereLayer,
- getGlobeAtmosphereSkyLayer
+ getGlobeAtmosphereSkyLayer,
+ getGlobeHugeHaloLayer
} from './atmosphere-layer';
export {GlobeDepthDiskLayer, getGlobeDepthDiskLayer} from './globe-depth-disk-layer';
export {
diff --git a/src/localization/src/translations/en.ts b/src/localization/src/translations/en.ts
index 60e203a7e..abd484561 100644
--- a/src/localization/src/translations/en.ts
+++ b/src/localization/src/translations/en.ts
@@ -48,6 +48,9 @@ export default {
'3dBuilding': '3D Building',
background: 'Background',
atmosphere: 'Atmosphere',
+ hugeHalo: 'Huge Halo',
+ hugeHaloRadius: 'Halo Radius',
+ hugeHaloOpacity: 'Halo Opacity',
basemap: 'Basemap',
adminBorders: 'Admin Borders',
terminator: 'Day/Night',
diff --git a/src/schemas/src/schema-manager.ts b/src/schemas/src/schema-manager.ts
index b3da61171..ebbfff4f5 100644
--- a/src/schemas/src/schema-manager.ts
+++ b/src/schemas/src/schema-manager.ts
@@ -32,6 +32,9 @@ export type SavedMapState = {
enabled: boolean;
config: {
atmosphere: boolean;
+ hugeHalo?: boolean;
+ hugeHaloRadius?: number;
+ hugeHaloOpacity?: number;
azimuth: boolean;
azimuthAngle: number;
terminator: boolean;
diff --git a/src/types/reducers.d.ts b/src/types/reducers.d.ts
index c50e90b7e..9f2184820 100644
--- a/src/types/reducers.d.ts
+++ b/src/types/reducers.d.ts
@@ -46,6 +46,9 @@ export type MapState = {
enabled: boolean;
config: {
atmosphere: boolean;
+ hugeHalo: boolean;
+ hugeHaloRadius: number;
+ hugeHaloOpacity: number;
azimuth: boolean;
azimuthAngle: number;
terminator: boolean;