Outline the viewport in yellow while it shows a partial render and in red for fallbacks and errors

This commit is contained in:
Dennis Kobert committed 2026-11-21 19:30:12 +01:00
1 parent 5779dca840
commit b3823aa4e6
1 file changed
+18
@@ -721,6 +721,11 @@
{#if isWeb && !["Error", "Panic"].includes($document.renderStatus)}
<TextLabel class="shader-compiling-overlay" italic={true} classes={{ show: !firstArtworkReceived }}>Initializing Renderer…</TextLabel>
{/if}
{#if $document.renderStatus === "Partial"}
<div class="render-status-outline"></div>
{:else if ["Fallback", "Error", "Panic"].includes($document.renderStatus)}
<div class="render-status-outline failed"></div>
{/if}
{#if $document.renderStatus === "Error"}
<LayoutCol class="render-status-overlay">
<TextLabel>
@@ -983,6 +988,19 @@
}
}
.render-status-outline {
position: absolute;
inset: 0;
// Above the error overlays so the outline frames them too
z-index: 1;
box-shadow: inset 0 0 0 1px var(--color-warning-yellow);
pointer-events: none;
&.failed {
box-shadow: inset 0 0 0 1px var(--color-error-red);
}
}
.render-status-overlay {
position: absolute;
inset: 0;