DesertCliffs.module
README.md
DesertCliffs
Real rock over a desert's steep ground. The engine terrain paints from straight above, so on a cliff its texture smears down the face into vertical streaks; DesertCliffs lays a thin skin over every stretch steeper than about 40 degrees that the desert paints as rock (a sand slip face, a dune crest or the walk's graded cut stays sand), built from the same heights the terrain stands, 0.35 m proud of it, with its texture wrapped round the wall (u along the face, v up it, 4 m a repeat) and drawn with desertMaterials' sandstoneVarnished, whose strata follow world height and whose desert varnish hangs from the ledges. One mesh, one draw, no collider: the terrain under it is what you walk on.
DesertBuilder spawns it with every desert (mesa walls, valley sides, the arch's rock band) and switches its material with the look. Cliffs.spawn(grid, parent, material) answers the entity, or nil when nothing is steep; Cliffs.mesh(grid, { steep?, minRock?, offset?, uvMetres? }) builds the mesh alone. STEEP, MIN_ROCK (the grid's rock weight a quad needs), OFFSET and UV_METRES hold the defaults; DesertBuilder.CLIFF_SURFACE names the surface.