Add panorama previews and repair beta export rendering

This commit is contained in:
2026-10-04 23:12:34 +05:00
parent 763cf8713c
commit aec0641f87
21 changed files with 802 additions and 60 deletions

View File

@@ -179,7 +179,7 @@ async function processJob(job: {
);
const report = await renderSnapshot(
terrain,
manifest.viewpoints,
manifest.availableViewpoints ?? manifest.viewpoints,
output,
{
size: Number(process.env.MINEGEO_FACE_SIZE || 1024),
@@ -196,7 +196,7 @@ async function processJob(job: {
.webp({ quality: 90 })
.toFile(`${output}/map.webp`);
let processedFaces = 0;
for (const point of manifest.viewpoints) {
for (const point of manifest.availableViewpoints ?? manifest.viewpoints) {
await mkdir(`${output}/${point.id}`, { recursive: true });
for (const face of faces) {
const bytes = await readFile(
@@ -257,7 +257,8 @@ async function processJob(job: {
{
contentType: "image/webp",
upsert: true,
cacheControl: "31536000",
// Drafts can be repaired before publication.
cacheControl: "60",
},
),
);