import { Model } from "../core/model.js"; import { ProgressCallback } from "../core/progress.js"; import { ModelInfo } from "../core/progress_log.js"; import { Scene } from "../core/scene.js"; /** * Options threading the progress/yield contract (issue #301) through a load. */ export interface ModelLoadOptions { /** * Structured, throttled progress events across the load phases * (headerParse / dataParse / geometry) — see core/progress.ts. */ onProgress?: ProgressCallback; /** * When true, the parse and geometry loops periodically await a macrotask * so browsers can repaint between progress events and the tab is not * flagged as stalled. Costs a few % wall clock; off by default. */ yieldToEventLoop?: boolean; /** Minimum ms between progress events (default in core/progress.ts). */ progressIntervalMs?: number; /** * Fired once, right after the STEP header parses — before the full file * parse — with everything the header reveals, so callers can print the * model line as early as possible (issue #301 follow-up, log line 3). */ onModelInfo?: (info: ModelInfo) => void; } /** * Static class for loading a model from a Uint 8 array... * * note this is only the initial model parse, no geometry extraction has been performed. */ export declare class ConwayModelLoader { /** * Load a model using the format detector * * @param data The buffer to load from. * @param limitCSGDepth Whether to limit CSG depth during geometry extraction. * @param maximumCSGDepth The maximum CSG depth allowed during geometry extraction. * @param modelID The model id to use for statistics (or 0 if none is provided) * @param options Optional progress/yield options for the load. * @return {Promise<[Model, Scene]>} A promise to return the loaded model and scene. */ static loadModelWithScene(data: Uint8Array, limitCSGDepth?: boolean, maximumCSGDepth?: number, modelID?: number, options?: ModelLoadOptions): Promise<[ Model, Scene ]>; } //# sourceMappingURL=conway_model_loader.d.ts.map