fix(ui-map): repaint fog as layered overpaint; rename to visibleHyperspace
Tests · UI / test (push) Waiting to run
Tests · UI / test (push) Waiting to run
The Phase 29 fog overlay rendered as a handful of random arc segments instead of a clean union of holes around LOCAL planets — Pixi v8's `Graphics.cut()` does not reliably subtract multiple overlapping circles from a base path. Replaced the cut-based approach with a layered overpaint: a fog-tinted rectangle fills the world, then opaque background- coloured circles are painted on top for every visibility circle. The natural rendering order unions overlapping circles for free — no geometry, no `cut()` quirks, one extra fill per circle. Renamed the toggle from `visibilityFog` to `visibleHyperspace` across the store, i18n strings, popover, tests, and docs. The overlay still implements the visual "fog" effect at the renderer level (FOG_COLOR, setVisibilityFog, getMapFog); the toggle is named after the player-facing concept it controls — the portion of the map that is visible (intelligence/scan coverage) — rather than the obscured part. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+11
-6
@@ -3189,7 +3189,10 @@ Artifacts:
|
||||
toggles plus a `unreachablePlanets` switch that, when off,
|
||||
hides planets beyond `FlightDistance(localPlayerDrive)` of
|
||||
every LOCAL planet (torus-aware).
|
||||
- **View** — visibility-fog checkbox + torus / no-wrap radios.
|
||||
- **View** — "visible hyperspace" checkbox + torus / no-wrap
|
||||
radios. The fog overlay is named for the visible part of the
|
||||
map (intelligence/scan area), since that is what the toggle
|
||||
controls from the player's perspective.
|
||||
- `RendererHandle.setHiddenPrimitiveIds(ids)` —
|
||||
declarative hide set; flips `Graphics.visible` per copy and
|
||||
threads the set into `hitTest` so click-through to deeper
|
||||
@@ -3245,11 +3248,13 @@ Decisions:
|
||||
player's `FlightDistance`. Reach is already implicit in the
|
||||
reach-aware destination picker (Phase 16+), so the cleaner UX
|
||||
is filtering, not adding extra rings.
|
||||
2. **Visibility fog overlay**. A separate `visibilityFog` toggle
|
||||
draws a slightly lighter fog over the world outside the union
|
||||
of `VisibilityDistance` circles around LOCAL planets. The fog
|
||||
is a renderer-level concept (Pixi `Graphics.cut()`), not a
|
||||
primitive — it never participates in hit-test.
|
||||
2. **Visible-hyperspace overlay**. A separate `visibleHyperspace`
|
||||
toggle draws a slightly lighter fog over the world outside the
|
||||
union of `VisibilityDistance` circles around LOCAL planets. The
|
||||
fog is a renderer-level concept (layered overpaint — fog rect
|
||||
then background-coloured circles on top — instead of Pixi's
|
||||
`Graphics.cut()`, which produced incorrect unions of holes), not
|
||||
a primitive: it never participates in hit-test.
|
||||
3. **Per-kind planet toggles + unidentified-group toggle**. The
|
||||
spec's original "object visibility" list was extended:
|
||||
foreign / uninhabited / unidentified planet kinds and
|
||||
|
||||
Reference in New Issue
Block a user