/** This file must only contain pure code and pure imports */ import { AssetContainer } from "@babylonjs/core/assetContainer.js"; import { type ISceneLoaderAsyncResult, type ISceneLoaderPluginAsync, type ISceneLoaderPluginFactory, type ISceneLoaderProgressEvent, type SceneLoaderPluginOptions } from "@babylonjs/core/Loading/sceneLoader.js"; import { type Scene } from "@babylonjs/core/scene.pure.js"; import { type USDFileLoaderOptions } from "./usdLoadingOptions.js"; /** * OpenUSD scene loader backed by a WebAssembly command-buffer extractor. */ export declare class USDFileLoader implements ISceneLoaderPluginAsync, ISceneLoaderPluginFactory { /** * Default URLs for the prebuilt OpenUSD importer assets. */ static DefaultConfiguration: { glueUrl: string; wasmUrl: string; dataUrl: string; workerUrl: string; }; /** * Defines the name of the plugin. */ readonly name: "usd"; /** * Defines the extensions the plugin can load. */ readonly extensions: { readonly ".usd": { readonly isBinary: true; }; readonly ".usda": { readonly isBinary: true; }; readonly ".usdc": { readonly isBinary: true; }; readonly ".usdz": { readonly isBinary: true; }; }; private readonly _options; private _worker; private _workerUrl; private _workerBlobUrl; private _nextRequestId; private readonly _pending; private readonly _activeLoads; /** * Creates a USD loader. * @param options Options controlling worker assets, supporting files, and diagnostics. */ constructor(options?: Partial); /** * Creates a configured plugin instance for a SceneLoader operation. * @param options SceneLoader plugin options. * @returns The configured USD loader. */ createPlugin(options: SceneLoaderPluginOptions): ISceneLoaderPluginAsync; /** * Imports all objects from a USD stage into a scene. * @param _meshesNames Mesh name filtering is not currently supported. * @param scene The scene receiving the imported objects. * @param data The USD, USDA, USDC, or USDZ bytes. * @param rootUrl The source root URL. * @param onProgress SceneLoader progress callback. * @param fileName Name of the root USD layer. * @returns The imported Babylon.js objects. */ importMeshAsync(_meshesNames: string | readonly string[] | null | undefined, scene: Scene, data: unknown, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise; /** * Loads a USD stage into a scene. * @param scene The scene receiving the imported objects. * @param data The USD, USDA, USDC, or USDZ bytes. * @param rootUrl The source root URL. * @param onProgress SceneLoader progress callback. * @param fileName Name of the root USD layer. */ loadAsync(scene: Scene, data: unknown, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise; /** * Loads a USD stage into an asset container. * @param scene The scene used to create imported objects. * @param data The USD, USDA, USDC, or USDZ bytes. * @param rootUrl The source root URL. * @param onProgress SceneLoader progress callback. * @param fileName Name of the root USD layer. * @returns The populated asset container. */ loadAssetContainerAsync(scene: Scene, data: unknown, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise; /** * Releases the worker and rejects pending loads. */ dispose(): void; private _loadAsync; private _getWorker; private _terminateWorker; } /** @internal */ export declare function _RegisterUSDLoaderDependencies(): void; /** * Registers the USD scene loader plugin and its Babylon.js runtime dependencies. * Safe to call multiple times; only the first call has an effect. */ export declare function RegisterUSDFileLoader(): void;