diff --git a/src/lib/components/immersive/ImmersiveBackground.svelte b/src/lib/components/immersive/ImmersiveBackground.svelte index f31e88a32..a53493038 100644 --- a/src/lib/components/immersive/ImmersiveBackground.svelte +++ b/src/lib/components/immersive/ImmersiveBackground.svelte @@ -1,17 +1,70 @@ -
- - +
+ {#if useWebGL && WebGLCanvas} + + + {:else if useFallback} + +
+ +
+ {:else} + +
+ {/if}
@@ -93,19 +157,21 @@ background-color: #0a0a0b; } + /* CSS Fallback styles */ + .fallback-container { + position: absolute; + inset: 0; + } + .background-canvas { position: absolute; - /* Extend beyond viewport to hide blur edges */ inset: -80px; width: calc(100% + 160px); height: calc(100% + 160px); - /* Smooth interpolation when scaling up */ image-rendering: auto; - /* Small blur to smooth out the 64x64 canvas - MUCH cheaper than 120px on full image */ filter: blur(40px); - /* GPU layer for performance */ transform: scale(1.15) translateZ(0); - will-change: opacity, filter; + will-change: opacity; transition: opacity 500ms ease-out; } @@ -113,11 +179,18 @@ opacity: 0; } - /* Subtle dark overlay */ + .loading-placeholder { + position: absolute; + inset: 0; + background-color: #0a0a0b; + } + + /* Dark overlay */ .dark-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.15); pointer-events: none; + z-index: 1; }