Conversation
mouftz
marked this pull request as draft
September 24, 2026 18:16
Coverage Report for CI Build 36890505088Coverage remained the same at 98.593%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
mouftz
force-pushed
the
terrain-viewer-surface
branch
from
September 26, 2026 17:45
afd6095 to
584cf7a
Compare
mouftz
marked this pull request as ready for review
October 1, 2026 16:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Milestone #78 of the terrain viewer epic (#77): terrain is now drawn in the browser.
Closes #82, #83, #84 and #85.
a square plane under a camera looking straight down.
camera.tsfits the plane to thewindow without stretching it, at any window shape. The same plane gets raised into 3D
later, so none of this setup is redone.
colours.tsmaps each height to a colour along a ramp ofwater, sand, grass, rock and snow. Heights outside 0–255 are pulled to the ends. The
colour stops are one short list, so the Elevation Encoding ticket can retune them in one
place.
terrain.tsturns a grid into a texture on the plane, withnearest-neighbour filtering so each cell stays a sharp square instead of blurring into
its neighbours.
terrainSource.tsanswers a request of seed, cornerand size (in cells) with a height grid. It is async and takes one request object, so
the HTTP service from Ask for terrain over HTTP #75 can replace it without the rest of the viewer changing. Each
height comes only from the cell's world position, so two regions that meet along an
edge agree about the terrain there.
Validation
scripts/quality-check.shpasses locally/testcommands were run and are passing (e.g./test gpu)Ran the dev server and checked each step in a browser. The plane stays square and centred
in wide and tall windows. Cells draw with hard edges, and the stand-in produces a coastline
rather than noise. No scrollbars, and the console is clean.
19 unit tests cover: the canvas following the window size and cleaning up when removed,
the camera framing, colours staying in range and clamping, one opaque pixel per cell in
order, sharp-edged filtering, and the stand-in's grid size, range, seeds, negative corners,
and two overlapping regions returning identical heights for the cells they share.
Checklist