← Commit history
0.11.1: the loading screen uses the scene's steel-blue gradient, not flat gray
4 files changed
+12−5
VERSION+1−1@@ -1 +1 @@-0.11.0+0.11.1
package.json+1−1@@ -1,6 +1,6 @@ { "name": "adom-3d-viewer-babylon9",- "version": "0.11.0",+ "version": "0.11.1", "description": "The Babylon 9.5 engine behind every component page's 3D tab on wiki.adom.inc. Versioned ESM bundle with GLB loading, view cube, layers toolbar, ground shadows, and Z-up CAD framing.", "type": "app", "main": "./dist/index.js",
src/ThreeDViewer.svelte+1−1@@ -800,7 +800,7 @@ canvas.width = container.clientWidth; canvas.height = container.clientHeight; - const loadingScreen = new ResizableLoadingScreen(canvas, 'Loading...', '#bfbfbf');+ const loadingScreen = new ResizableLoadingScreen(canvas, 'Loading...'); engine.loadingScreen = loadingScreen; engine.displayLoadingUI(); document.addEventListener('securitypolicyviolation', onCspViolation);
src/lib/adom-babylon/ui/ResizableLoadingScreen.ts+9−2@@ -1,18 +1,25 @@ import type { ILoadingScreen } from '@babylonjs/core'; import { ADOM_LOGO_BASE64 } from '../assets/adomLogo'; +/** The viewer's steel-blue studio gradient, top to bottom. */+export const LOADING_BACKGROUND = 'linear-gradient(180deg, #5a6b7e 0%, #2a3340 100%)';+ export class ResizableLoadingScreen implements ILoadingScreen { private _renderingCanvas: HTMLCanvasElement; private _loadingDiv: HTMLDivElement | null = null; private _resizeObserver: ResizeObserver | null = null; public loadingUIText: string;+ /** Any CSS background value. */ public loadingUIBackgroundColor: string; constructor( renderingCanvas: HTMLCanvasElement, loadingText: string = 'Loading...',- loadingDivBackgroundColor: string = '#bfbfbf'+ // The scene's own background (SceneBuilder, 3d-viewer-design ยง3b), so+ // the loader hands off to the first frame without a color jump. It+ // was a flat #bfbfbf gray.+ loadingDivBackgroundColor: string = LOADING_BACKGROUND ) { this._renderingCanvas = renderingCanvas; this.loadingUIText = loadingText;@@ -27,7 +34,7 @@ export class ResizableLoadingScreen implements ILoadingScreen { this._loadingDiv.style.cssText = ` position: absolute; top: 0; left: 0; width: 100%; height: 100%;- background-color: ${this.loadingUIBackgroundColor};+ background: ${this.loadingUIBackgroundColor}; display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 1000; pointer-events: none;