import { AbstractEngine, Scene } from '../../../../types/src/3d-viewer';

/** Configuration options for SceneController initialization */
export interface SceneControllerOptions {
    /** Enable antialiasing for smoother rendering */
    antialias?: boolean;
    /** Background color for the loading UI */
    loadingUIBackgroundColor?: string;
    /** Use WebGPU instead of WebGL for rendering (experimental) */
    useWebGPU?: boolean;
}
/**
 * Manages Babylon.js engine initialization, scene creation, and resource lifecycle.
 * Handles both WebGL and WebGPU rendering contexts with custom loading UI.
 *
 * Features:
 * - WebGL/WebGPU engine initialization with optimized settings
 * - Custom OrangeLogic-branded loading spinner
 * - Automatic canvas resizing
 * - Scene and engine resource management
 * - Model loading with error handling
 */
export declare class SceneController {
    /** The Babylon.js rendering engine (WebGL or WebGPU) */
    private engine;
    /** The current Babylon.js scene instance */
    private scene;
    /** HTML canvas element for rendering */
    private canvas;
    /** Window resize event handler for canvas resizing */
    private resizeHandler?;
    /** Loading UI container element */
    private loadingDiv?;
    private readonly glslangOptions;
    private readonly twgslOptions;
    /**
     * Creates a new SceneController instance.
     *
     * @param canvas - HTML canvas element to render to
     */
    constructor(canvas: HTMLCanvasElement);
    /**
     * Initializes the Babylon.js rendering engine with optimized settings.
     * Supports both WebGL and WebGPU contexts with high precision matrices.
     *
     * @param options - Configuration options for engine initialization
     */
    initEngine(options?: SceneControllerOptions): Promise<void>;
    /**
     * Displays a custom OrangeLogic-branded loading spinner.
     * Creates a full-screen overlay with animated SVG spinner.
     */
    displayLoadingUI(): void;
    /**
     * Hides the loading UI with a smooth fade-out transition.
     * Removes the loading overlay from the DOM after animation completes.
     */
    hideLoadingUI(): void;
    resize(): void;
    /**
     * Loads a 3D model file and creates a new Babylon.js scene.
     * Handles loading UI display/hiding and proper scene disposal.
     *
     * @param url - URL of the 3D model file (GLB/GLTF format)
     * @returns Promise that resolves to the loaded scene
     * @throws Error if model loading fails
     */
    loadModel(url: string): Promise<Scene>;
    /**
     * Starts the Babylon.js render loop for continuous scene rendering.
     * Waits for scene to be ready before beginning the render loop.
     *
     * @param onRender - Optional callback executed before each frame render
     * @throws Error if scene or engine are not initialized
     */
    startRenderLoop(onRender?: () => void): void;
    /**
     * Gets the current Babylon.js engine instance.
     *
     * @returns The active engine (WebGL or WebGPU)
     */
    getEngine(): AbstractEngine;
    /**
     * Gets the current Babylon.js scene instance.
     *
     * @returns The active scene
     */
    getScene(): Scene;
    /**
     * Properly disposes of all Babylon.js resources to prevent memory leaks.
     * Removes event listeners, disposes scene and engine.
     */
    dispose(): void;
}
