Render textured aerial maps and support legacy recovery links

This commit is contained in:
2026-10-05 18:11:12 +05:00
parent dcc3779262
commit 2cbaf45340
12 changed files with 226 additions and 35 deletions

18
tests/map-view.test.ts Normal file
View File

@@ -0,0 +1,18 @@
import { test } from "node:test";
import assert from "node:assert/strict";
import { mapDimensions } from "../renderer/map-view.mjs";
test("aerial map pixels keep rectangular X/Z bounds square", () => {
assert.deepEqual(
mapDimensions({ minX: -32, maxX: 96, minZ: -16, maxZ: 48 }),
{ width: 1024, height: 512 },
);
assert.deepEqual(
mapDimensions({ minX: 0, maxX: 2048, minZ: 0, maxZ: 1024 }),
{ width: 2048, height: 1024 },
);
assert.throws(
() => mapDimensions({ minX: 4, maxX: 4, minZ: 0, maxZ: 16 }),
/positive integer/,
);
});