import { LoadingProgressArgs } from "../engine_setup.js"; declare type LoadingStyleOption = "dark" | "light" | "auto"; /** Loading overlay layout. `centered` = bar centered, capped at 50% width, with an (optional) logo above it (default). `minimal` = thin bar pinned to the top. */ declare type LoadingLayoutOption = "minimal" | "centered"; /** @internal */ export declare class LoadingElementOptions { className?: string; additionalClasses?: string[]; } /** @internal */ export interface ILoadingViewHandler { onLoadingBegin(message?: string): any; onLoadingUpdate(progress: LoadingProgressArgs | number, message?: string): any; onLoadingFinished(message?: string): any; setMessage(string: string): any; } /** @internal */ export declare function calculateProgress01(progress: LoadingProgressArgs): number; /** @internal */ export declare class EngineLoadingView implements ILoadingViewHandler { static LoadingContainerClassName: string; loadingProgress: number; /** Usually the NeedleEngineHTMLElement */ private _element; private _progress; private _allowCustomLoadingElement; private _loadingElement?; private _loadingTextContainer; private _loadingBar; private _messageContainer; private _loadingElementOptions?; /** * Creates a new loading view * @param owner the element that will contain the loading view (should be the NeedleEngineHTMLElement) */ constructor(owner: HTMLElement, opts?: LoadingElementOptions); onLoadingBegin(message?: string): Promise; onLoadingUpdate(progress: LoadingProgressArgs | ProgressEvent | number, message?: string): void; onLoadingFinished(): void; setMessage(message: string): void; private _progressLoop; private smoothProgressLoop; private onDoneLoading; private updateDisplay; private createLoadingElement; /** * Dev-only: show the loading overlay with a looping fake progress so the loading UI can be * previewed and iterated on without loading a scene. Attributes (`loading-style`, * `loading-layout`, `loading-logo`, `poster`, ...) are read from `options` or from `target`. * * Auto-runs when the URL contains `?loadingpreview` (optionally `?loadingpreview=centered`). * Can also be called manually, e.g. `document.querySelector("needle-engine")` as target. * * @returns a function that stops the preview and hides the overlay. */ static preview(target?: HTMLElement, options?: { layout?: LoadingLayoutOption; theme?: LoadingStyleOption; logo?: boolean; logoSrc?: string; poster?: string; }): () => void; } export {};