Log inGet started
World

Mirage Wells: Desert Dunes, Oasis and Ruins Kit

README.md

RockGeo

Bake-time geometry kit for desertProps' stone and built kinds, on top of tropicalProps' ShoreGeo (buffers, seeded rng, polytopes, boards, tubes, grids, flat shading). It adds a signed-distance toolkit and a surface-nets mesher: sphere, ellipsoid, rounded box, capsule, round cone, cylY/X/Z, archHole (an arch opening in XY), smin / smax, and nets(sdf, lo, hi, h, opts) / mesh(sdf, lo, hi, tris, opts), which turn any distance function into a smooth-shaded closed mesh with box-projected UVs in metres (desertMaterials stone is 1 uv unit = 1 m) and a vertex tint with a crevice term. mesh picks the cell size from a triangle budget, so the LODs of one shape are the same rock at three resolutions. Also: rock strata / layerAt / recess (ledges and undercuts), sandstoneTint (per-layer tone, desert-varnish streaks, sand-dusted foot), plainTint, split (one mesh into named parts per triangle), unionBounds / padBounds (every part and LOD shares one bounding box), lathe (pots, columns, barrels) and block (chamfered dressed stone).

local G = require("desertProps.RockGeo")
local g = G.mesh(function(x, y, z) return G.sphere(x, y - 1, z, 1) end, { -1.2, -0.5, -1.2 }, { 1.2, 2.2, 1.2 }, 1500)

Called by RockGen, Ruins and Camp (the generators) and RockBake; nothing on the gameplay path requires it.