Element ยท library file

edges

The edge contract: the top and the edge pin every dirt and water starts with, so that neighbouring tiles butt with no step. Every tile reads it without a use line.

Writing it

dharmatiles version="1.0.0"

// library/parts/edges.dtile
defaults {
    dirt  top="[$groundHeight .. $groundHeight + 1dmm]" { pin top="$dirtEdgeHeight" at=edges }
    water top="[$waterSurfaceHeight - 1.9dmm .. $waterSurfaceHeight + 3dmm]" { pin top="$waterEdgeHeight" at=edges }
}

Reference

LineMeans
dirtThe first dirt meets every tile edge at $dirtEdgeHeight, 3.4dmm; its top is [$groundHeight .. $groundHeight + 1dmm].
waterWater meets the tile edge at $waterEdgeHeight: $waterSurfaceHeight, 2.6dmm, plus 0.6dmm of a shared tide, cos(720deg * ($x - $y)), two waves a square, so two water tiles butt any way round.
flagstones, planksA built floor meets the edge at $floorEdgeHeight, flush with its top, 7.4dmm.

The heights are the $ names of library/parts/heights.dtile; a tile may override them (and the edge note says it no longer butts a standard tile).

Notes

Runs on an edge (walls, cliffs) end in the standard end section, so runs butt together too. See how tiles meet.

Seen from the language

The guide pages that use edges: The tile document, Heights, Defaults and the edge contract.