fix(sky): restore the Milky Way on teardown, tidy the anime QA script

- VisualEffects.destroy() puts skyBox.milkyWayVisibility back to 1, as it
  already restores the borrowed bloom stage, so a surviving viewer does not
  keep a faded sky.
- Rename scripts/qa-anime-space-mask.mjs to qa-anime-sky.mjs: rewrite the
  header for the current approach, drop --space-expr and --repo, import
  puppeteer as a package, reject unknown cases and count the milkyway case
  as reached only while the anime stage is on.
- Put both sky QA scripts under format:check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
German KhokhlovandClaude Opus 5.5 committed 2026-10-20 00:42:22 +04:00
1 parent 65b98b4971
commit 8deb47560e
4 files changed
+78 -42

No files matched your search

+8 -2
View File
@@ -115,7 +115,7 @@ export class VisualEffects {
// Anime's four luminance bands turn the faint Milky Way into blotches, and
// a post-process cannot tell the sky from far geometry reliably (near
// plane clamps, keyless terrain above the ellipsoid horizon): fade the
// glow out with the style instead. Stars survive as banded points.
// glow out with the style instead. Bright stars survive as banded points.
if (stage === this.stages.anime) {
const sky = this.viewer.scene?.skyBox;
if (sky && 'milkyWayVisibility' in sky)
@@ -228,7 +228,7 @@ export class VisualEffects {
this.transitions.clear();
}
/** Remove owned stages and restore the borrowed bloom stage after callers release it. */
/** Remove owned stages and restore the borrowed bloom stage and sky after callers release them. */
destroy() {
if (this.destroyed) return;
this.stop();
@@ -240,5 +240,11 @@ export class VisualEffects {
Object.assign(this.bloomStage.uniforms, this.previousBloom.uniforms);
this.bloomStage.enabled = this.previousBloom.enabled;
}
// Anime may have faded the Milky Way out; a surviving viewer gets it back.
const sky = this.viewer.scene.skyBox;
if (sky && 'milkyWayVisibility' in sky) {
sky.milkyWayVisibility = 1;
this.requestRender('style-stage');
}
}
}