Normalized height at a world point (flatten targets).
Apply one brush stamp across every resident region it touches and flush the edited tile rects (GPU upload + padded VT re-bake). Returns the touched per-region rects (undo bookkeeping), empty when the brush missed every resident region.
Carve a spline profile into every resident region it crosses (the
region-mode counterpart of carveSplineIntoHeights over a single
map). Each region mirror is its own edge-aligned grid, and the carve
is a pure function of (world position, existing value), so the
duplicated border samples land identical on both sides — same
argument as the brushes. Returns the touched per-region rects.
Snapshot the mirrors of the regions a stroke may touch (stroke start). Keyed like regionKey.
Diff the accumulated per-region stroke rects against a stroke-start snapshot into replayable edits. Rects for the same region are unioned.
Write one region rect back (undo/redo) and flush it.
Rebuild per-region consumers (physics bodies) for the regions a stroke touched — call once per stroke end, not per stamp.
Encode a dirty region's mirror as a raw LE uint16 tile (save-back).
Region keys (
"rx_rz") with unsaved height edits. The editor's save writes these tiles back to their files and clears the set.