Report renderer progress and detect stalled jobs
This commit is contained in:
21
shared/processing-progress.ts
Normal file
21
shared/processing-progress.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
export type ProcessingJob = {
|
||||
state: string;
|
||||
progress: number;
|
||||
error: string | null;
|
||||
updated_at: string;
|
||||
lease_until: string | null;
|
||||
};
|
||||
|
||||
// Stage ranges describe completed work, never an estimate of remaining time.
|
||||
export function processingStage(progress: number) {
|
||||
if (progress < 20) return "Downloading and checking the export";
|
||||
if (progress < 25) return "Reading the terrain snapshot";
|
||||
if (progress < 30) return "Indexing terrain blocks";
|
||||
if (progress < 35) return "Loading block models and textures";
|
||||
if (progress < 55) return "Building terrain geometry";
|
||||
if (progress < 60) return "Preparing the scene";
|
||||
if (progress < 85) return "Rendering panorama faces";
|
||||
if (progress < 90) return "Rendering the surface map";
|
||||
if (progress < 100) return "Saving processed images";
|
||||
return "Processing complete";
|
||||
}
|
||||
Reference in New Issue
Block a user