Speed up large movement gallery entry (Byzantine)

Hall frames use thumbs only (never multi-MB originals). Preload no longer blocks open; texture downloads are queued; boot overlay no longer waits on HDR Environment.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Danila KhodjaefandCursor committed 2026-07-30 20:40:06 +03:00
1 parent 0a5918c4dd
commit 710d262516
4 files changed
+121 -93

No files matched your search

+6 -2
View File
@@ -177,7 +177,7 @@ export function galleryImageUrl(
return null;
}
/** Ordered texture URL candidates for a hall frame (thumb → full → on-demand API). */
/** Ordered hall texture URLs — thumbs only (never full originals; those can be 10MB+ each). */
export function galleryImageUrlCandidates(
painting: {
id?: number;
@@ -194,10 +194,14 @@ export function galleryImageUrlCandidates(
if (u && !urls.includes(u)) urls.push(u);
};
if (painting.thumbnail_path) push(imageUrl(painting.thumbnail_path, revision));
if (painting.image_path) push(imageUrl(painting.image_path, revision));
// If DB has no thumb path but has a full file, still prefer the on-demand thumb API
// over streaming the multi-megabyte original into WebGL.
if (painting.id != null) {
push(`/api/paintings/${painting.id}/image?size=thumb`);
}
if (!painting.thumbnail_path && painting.image_path) {
push(imageUrl(painting.image_path, revision));
}
return urls;
}