Skip to content

Show climate parameters on the dimension biome map - #261

Merged
ItsMeBrianD merged 1 commit into
mainfrom
claude/project-thread-98ykjy
Nov 11, 2026
Merged

ItsMeBrianD merged 1 commit into
mainfrom
claude/project-thread-98ykjy

Conversation

@ItsMeBrianD

Copy link
Copy Markdown
Contributor

Requested by Brian · project thread

Makes it possible to see why a biome isn't showing up on a dimension's Biomes map. It's built in the shared packages/preview, so the web editor and VS Code both get it.

What changed

  • Hover readout: shows the six climate values at the pointer, or at the pinned point. They're sampled at the camera's Y, which is what depth depends on. For multi-noise sources it also lists the 4 nearest entries, best first, one per biome, with their distances. For each entry that lost, it names the parameters the climate falls outside of (e.g. humidity -0.300 ∉ 0.250…1.000).
  • Show: switches the map to one climate parameter (diverging palette, range in view) or to Distance to win for a chosen biome (magma, 0 where it wins). The biome outlines stay on top in both. The existing Palette and Range controls apply, and each layer kind remembers its own palette.
  • Explain: picks a biome to follow. By default it's the first biome the source lists that wins nowhere in view. Its nearest entry under the pointer is shown in amber, and biomes that win nowhere in view are listed under the legend.
  • Worker: samples the climate once per 4×4×4 cell. For inline multi-noise sources it looks the entry up through a Deepslate Climate.Parameters that returns the entry's index, so the map, the readout and the distance layer all agree with the game's choice. The response now carries per-pixel climate planes, the winner's fitness and the packed entries. These are transferred, and last is $state.raw.
  • Logic: the pure functions are in preview/climate.ts: fitness, nearest entries, the distance layer and the list of missing biomes.
  • Docs: added a "Why a biome doesn't appear" section to site/guides/editors.md (mcp docs synced), plus a line in the VS Code README.

Sources that aren't multi-noise (fixed, checkerboard, the end) still get the climate readout and layers, but no entries.

Tests

  • New smoke test a biome map shows the climate and explains which biome wins, run on cave-siege.
  • The existing preview, palette and docs smoke tests pass (16 run).
  • svelte-check passes for preview, web and vscode.
  • TestSiteSamples and TestDocsInSync pass.

Generated by Claude Code

The biome map now explains why a biome wins or never appears:
- hovering (or a pinned point) lists the six climate values sampled there
  and, for multi-noise sources, the nearest entries best first, each with
  the parameters the climate is outside of;
- Show switches the map to one climate parameter, or to Distance to win
  for a chosen biome (0 where it wins), with biome outlines kept on top;
- Explain picks the biome to follow, and biomes listed in the source that
  win nowhere in view are named under the legend.

The worker samples the climate once per cell and looks the entry up in a
Deepslate Climate.Parameters that returns the entry index, so the map,
the readout and the distance layer agree with the game's choice.
Shared in packages/preview, so the web editor and VS Code both get it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AX3Tsy7i4uq6VDFLmVvUqF
@ItsMeBrianD ItsMeBrianD self-assigned this Nov 11, 2026
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ItsMeBrianD
ItsMeBrianD merged commit 251ee70 into main Nov 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants