Skip to content

Fix the rendering faults on the Crust and Plate Motion screens - #8

Merged
veillette merged 1 commit into
mainfrom
claude/screen-rendering-issues-0ziz4t
Aug 7, 2026
Merged

Fix the rendering faults on the Crust and Plate Motion screens#8
veillette merged 1 commit into
mainfrom
claude/screen-rendering-issues-0ziz4t

Conversation

@veillette

Copy link
Copy Markdown
Contributor

Plate Motion was drawing four things wrong, all visible on first load:

  • The sea was never painted. paintMantle filled the section from sea
    level down, over the seawater rectangle drawn just before it, so
    showSeawaterProperty was a no-op and every ocean floor had sky above
    it instead of water. The mantle is now clipped to below the ground —
    the merge of both plates' crustTop polylines — which also lets a
    collision belt standing above the waterline keep mantle under it.

  • The subducting plate drew as a bowtie. subductionGeometry
    reversed the down-going plate's crustTop but not its two base lines.
    fillBand closes a band by walking the top forward and the base back,
    so the mismatched direction folded the plate into a self-crossing X
    spanning half the section. All three polylines now run the same way,
    and PlateGeometry.test.ts asserts that invariant for every pairing,
    motion and time — it fails on the old code.

  • Density mode, the default, showed no plates and no slab. The
    lithospheric mantle and the descending slab were both painted at the
    asthenosphere's MANTLE_DENSITY_KG_M3, so each plate appeared to be
    crust floating on nothing. They are the same rock at different
    temperatures, and the density difference is the whole reason a cooled
    plate can sink, so they now get their own values.

  • A spent slab smeared along the floor. CrossSectionScale.y clamps,
    so a slab past the bottom of the view was drawn as a horizontal streak
    along the bottom edge with its arrow-heads strung out sideways. The
    centreline is trimmed at the first point below the section.

Also on that screen, the crust chooser overlapped the cross-section: the
section's top was inset by a hardcoded 62 px against a panel that is
taller than that. It is measured now, since the height depends on the
font and on the length of the localized crust names.

On Crust, a block whose surface is below sea level had its label placed
in the few pixels of water above it, landing on the sea-level line and
its caption — which is exactly where the user's own block sits at the
default thickness. Submarine blocks now carry the label just inside the
rock; blocks standing above the water keep theirs in the sky. columnAt
also treats the outermost edge of the last block as inside it, so the
right-hand edge of the viewport no longer reads as open mantle to the
painter and the probe.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01JZ1JDB8VPtJPHoiu7C33kQ

Plate Motion was drawing four things wrong, all visible on first load:

- **The sea was never painted.** `paintMantle` filled the section from sea
  level down, over the seawater rectangle drawn just before it, so
  `showSeawaterProperty` was a no-op and every ocean floor had sky above
  it instead of water. The mantle is now clipped to below the ground —
  the merge of both plates' `crustTop` polylines — which also lets a
  collision belt standing above the waterline keep mantle under it.

- **The subducting plate drew as a bowtie.** `subductionGeometry`
  reversed the down-going plate's `crustTop` but not its two base lines.
  `fillBand` closes a band by walking the top forward and the base back,
  so the mismatched direction folded the plate into a self-crossing X
  spanning half the section. All three polylines now run the same way,
  and `PlateGeometry.test.ts` asserts that invariant for every pairing,
  motion and time — it fails on the old code.

- **Density mode, the default, showed no plates and no slab.** The
  lithospheric mantle and the descending slab were both painted at the
  asthenosphere's `MANTLE_DENSITY_KG_M3`, so each plate appeared to be
  crust floating on nothing. They are the same rock at different
  temperatures, and the density difference is the whole reason a cooled
  plate can sink, so they now get their own values.

- **A spent slab smeared along the floor.** `CrossSectionScale.y` clamps,
  so a slab past the bottom of the view was drawn as a horizontal streak
  along the bottom edge with its arrow-heads strung out sideways. The
  centreline is trimmed at the first point below the section.

Also on that screen, the crust chooser overlapped the cross-section: the
section's top was inset by a hardcoded 62 px against a panel that is
taller than that. It is measured now, since the height depends on the
font and on the length of the localized crust names.

On Crust, a block whose surface is below sea level had its label placed
in the few pixels of water above it, landing on the sea-level line and
its caption — which is exactly where the user's own block sits at the
default thickness. Submarine blocks now carry the label just inside the
rock; blocks standing above the water keep theirs in the sky. `columnAt`
also treats the outermost edge of the last block as inside it, so the
right-hand edge of the viewport no longer reads as open mantle to the
painter and the probe.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZ1JDB8VPtJPHoiu7C33kQ
@cursor

cursor Bot commented Aug 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@veillette
veillette merged commit b37acd6 into main Aug 7, 2026
7 checks passed
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@veillette
veillette deleted the claude/screen-rendering-issues-0ziz4t branch August 7, 2026 14:48
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