Skip to content

Commit 022a12c

Browse files
committed
Fix halo
1 parent f6ff1f8 commit 022a12c

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/app/globe-view/globe-view.component.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,16 @@ export class GlobeViewComponent implements AfterViewInit, OnDestroy, OnChanges {
578578
mat.uniforms['globeRotation'].value.set(pov.lng, pov.lat);
579579
globe.globeMaterial(mat);
580580

581-
this.applyFocusModeRendering();
581+
/*
582+
* Defer non-focus atmosphere / bloom / brightness to after globe.gl finishes internal setup.
583+
* Synchronous apply here often leaves the default thick atmosphere limb until something
584+
* (e.g. exiting Focus mode) calls applyFocusModeRendering again — same fix as focusMode
585+
* changes, which already use queueMicrotask.
586+
*/
587+
queueMicrotask(() => {
588+
if (!this.alive || !this.globe) return;
589+
this.applyFocusModeRendering();
590+
});
582591

583592
this.rotateTimer = setTimeout(() => {
584593
this.autoRotateEnabled = true;
@@ -631,6 +640,9 @@ export class GlobeViewComponent implements AfterViewInit, OnDestroy, OnChanges {
631640
} catch {
632641
/* ignore */
633642
}
643+
if (this.alive && this.globe) {
644+
this.applyFocusModeRendering();
645+
}
634646
this.introAnimationActive = true;
635647
this.introAnimationStartTime = performance.now();
636648
this.ngZone.run(() => {

0 commit comments

Comments
 (0)