diff --git a/app/diorama/mapTiles.ts b/app/diorama/mapTiles.ts index a269de6..cbe8bec 100644 --- a/app/diorama/mapTiles.ts +++ b/app/diorama/mapTiles.ts @@ -181,10 +181,12 @@ export function mapTileDrawing(look: MapLook): MapTileDrawing { const Rv = halfWidth / Math.SQRT2 - U * 0.25 const Rc = Rv + U * 0.15 const recolor = (p: Poly): Poly => (look.worn ? { ...p, fill: worn(p.fill), stroke: worn(p.stroke) } : p) + // The ground wears less than the buildings, so a barbarian village still sits in the grass. + const recolorGround = (p: Poly): Poly => (look.worn ? { ...p, fill: mix(p.fill, worn(p.fill), 0.5), stroke: mix(p.stroke, worn(p.stroke), 0.5) } : p) const keep = (p: Poly) => !(look.worn && bannerOrFire(p.fill)) const inside = (r: number) => r <= Rc * 0.98 // The steps fade into the grass whatever the village; only its own ground wears. - const clearing = look.worn ? mix(CLEARING, worn(CLEARING), 0.6) : CLEARING + const clearing = look.worn ? mix(CLEARING, worn(CLEARING), 0.35) : CLEARING const steps = [ { r: Rc + U * 0.7, fill: mix(clearing, MEADOW, 0.7) }, { r: Rc + U * 0.35, fill: mix(clearing, MEADOW, 0.38) }, @@ -202,7 +204,7 @@ export function mapTileDrawing(look: MapLook): MapTileDrawing { return { steps, clip: steps[2]!.points, - ground: scene.decals.filter((p) => keep(p) && !ROADS.has(p.fill)).map(recolor), + ground: scene.decals.filter((p) => keep(p) && !ROADS.has(p.fill)).map(recolorGround), objects, units: (Math.max(...ring(Rc + U * 0.7, 11).map(([x]) => Math.abs(x))) * 2) / FILL[look.tier], }