UNPKG

@needle-tools/engine

Version:

Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in.

45 lines (44 loc) 1.68 kB
import { LoadingProgressArgs } from "../engine_setup.js"; /** @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<void>; onLoadingUpdate(progress: LoadingProgressArgs | ProgressEvent | number, message?: string): void; onLoadingFinished(): void; setMessage(message: string): void; private _progressLoop; private smoothProgressLoop; private onDoneLoading; private updateDisplay; private createLoadingElement; private handleRuntimeLicense; }